FedoraRHEL Based

How To Install Angie Web Server on Fedora 40

Install Angie Web Server on Fedora 40

In this tutorial, we will show you how to install Angie Web Server on Fedora 40. Angie pronounced /ˈendʒi/, is an innovative web server that was forked from Nginx by some of its former core developers. It aims to extend functionality beyond the original version while maintaining compatibility with existing Nginx configurations. As a drop-in replacement for Nginx, Angie offers enhanced features and improved performance, making it an attractive option for system administrators and web developers alike.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the Angie Web Server on Fedora 40.

Prerequisites

Before we dive into the installation process, ensure that you have the following prerequisites in place:

  • A server running one of the following operating systems: Fedora 40.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • You will need access to the terminal to execute commands. Fedora provides the Terminal application for this purpose. It can be found in your Applications menu.
  • A stable internet connection to download the necessary packages.
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install Angie Web Server on Fedora 40

Step 1. Update Your System.

To ensure a smooth installation process and maintain the security of your Fedora 40 system, it is crucial to update all the installed packages to their latest versions. This step helps prevent potential compatibility issues and vulnerabilities. To update your system, open the terminal and run the following command:

sudo dnf clean all
sudo dnf update

Step 2. Installing Angie Web Server.

Angie is not available in the default Fedora repositories, so we need to add a custom repository to access the Angie packages. The GetPageSpeed repository provides production-grade, SELinux-compatible packages for the Angie web server.

To add the repository, run the following commands:

sudo dnf -y install https://extras.getpagespeed.com/release-latest.rpm
sudo dnf config-manager --enable getpagespeed-extras-angie

These commands will download and install the repository configuration file, and then enable the Angie-specific repository.

With the repository properly configured, we can now proceed to install Angie. Execute the following command to install the Angie web server:

sudo dnf install angie

DNF will resolve dependencies and install Angie along with any required packages. During the installation process, you may be prompted to accept the GPG key for the GetPageSpeed repository. Accept it to continue the installation.

Step 3. Configuring Angie.

After the installation is complete, it’s time to configure Angie. The main configuration file for Angie is located at /etc/angie/angie.conf. However, it’s recommended to create separate configuration files for different sites or applications in the /etc/angie/conf.d/ directory.

Let’s create a basic configuration file for a sample website:

sudo nano /etc/angie/conf.d/example.com.conf

Add the following content to the file:

server {
    listen 80;
    server_name example.com www.example.com;
    root /var/www/example.com;
    index index.html;

    location / {
        try_files $uri $uri/ =404;
    }
}

This configuration sets up a basic virtual host for the domain example.com. Make sure to replace example.com with your actual domain name.

Create the root directory for your website:

sudo mkdir -p /var/www/example.com

And create a sample index.html file:

echo "<h1>Welcome to Angie on Fedora 40!</h1>" | sudo tee /var/www/example.com/index.html

Step 4. Configuring Firewall.

To allow incoming HTTP and HTTPS traffic, we need to configure the firewall. Fedora 40 uses firewalld by default. Open the necessary ports with these commands:

sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload

These commands will open ports 80 (HTTP) and 443 (HTTPS) in the firewall, allowing incoming web traffic.

Step 5. Starting and Enabling Angie.

Now that we have configured Angie and opened the necessary firewall ports, we can start the Angie service and enable it to start automatically on system boot:

sudo systemctl start angie
sudo systemctl enable angie

To verify that Angie is running correctly, check its status:

sudo systemctl status angie

Step 6. Testing the Installation.

To test if Angie is working correctly, open a web browser and navigate to your server’s IP address or domain name. You should see the “Welcome to Angie on Fedora 40!” message we created earlier.

Step 7. Securing Angie with SSL/TLS.

For enhanced security, it’s crucial to enable HTTPS on your web server. Let’s use Certbot to obtain and install a free SSL/TLS certificate from Let’s Encrypt. First, install Certbot and its Angie plugin:

sudo dnf install -y certbot python3-certbot-nginx

Next, run Certbot to obtain and install the certificate:

sudo certbot --nginx -d example.com -d www.example.com

Follow the prompts to complete the certificate installation process. Certbot will automatically modify your Angie configuration to use the new certificate.

Congratulations! You have successfully installed Angie. Thanks for using this tutorial for installing the Angie Web Server on your Fedora 40 system. For additional or useful information, we recommend you check the official Angie website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to idroot.us, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button