HomeARCHInstall Nginx Web Server on Arch Linux|EndeavourOS

Install Nginx Web Server on Arch Linux|EndeavourOS

In this post, we will demonstrate how to Install Nginx Web Server on Arch Linux|EndeavourOS.

Nginx, also known as engine-X, is a free and open-source web server that can be used to host a website. It is often used as a reverse proxy, an HTTP cache, for load balancing, and for media streaming because it is simple and lightweight. Instead of creating new processes for each web request, Nginx employs an asynchronous, event-driven approach. Nginx is well-known for its high performance, security, and stability, as well as its extensive feature set, ease of configuration, and low resource consumption.

Install Nginx Web Server on Arch Linux|EndeavourOS

First, use the following command to update all the package indexes:

sudo pacman -Syu

Step 1: Install Nginx Web Server

The Nginx web server package is included by default in the Arch Linux|EndeavourOS default repository. You can run the following command to install it:

sudo pacman -S nginx

Sample output:

resolving dependencies...
looking for conflicting packages...

Package (1)  New Version  Net Change  Download Size

extra/nginx  1.22.1-2       1.66 MiB       0.57 MiB

Total Download Size:   0.57 MiB
Total Installed Size:  1.66 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 nginx-1.22.1-2-x86_64                                         587.2 KiB   159 KiB/s 00:04 [----------------------------------------------------] 100%
(1/1) checking keys in keyring                                                             [----------------------------------------------------] 100%
(1/1) checking package integrity                                                           [----------------------------------------------------] 100%
(1/1) loading package files                                                                [----------------------------------------------------] 100%
(1/1) checking for file conflicts                                                          [----------------------------------------------------] 100%
:: Processing package changes...
(1/1) installing nginx                                                                     [----------------------------------------------------] 100%
:: Running post-transaction hooks...
(1/2) Reloading system manager configuration...

Step 2: Start and Enable Nginx on Arch Linux|EndeavourOS

After installing Nginx, run the following command to start and enable the Nginx service:

sudo systemctl start nginx
sudo systemctl enable nginx

You can use the following command to check the status of Nginx:

systemctl status nginx

Output:

nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; preset: disabled)
     Active: active (running) since Wed 2023-03-15 10:18:18 UTC; 2min 34s ago
   Main PID: 10328 (nginx)
      Tasks: 2 (limit: 4576)
     Memory: 2.7M
        CPU: 63ms
     CGroup: /system.slice/nginx.service
             ├─10328 "nginx: master process /usr/bin/nginx -g pid /run/nginx.pid; error_log stderr;"
             └─10329 "nginx: worker process"

Mar 15 10:18:18 EndeavourOS systemd[1]: Starting A high performance web server and a reverse proxy server...
Mar 15 10:18:18 EndeavourOS nginx[10327]: 2023/03/15 10:18:18 [warn] 

Now, open your web browser and navigate to the Nginx test page at http://your-server-ip.
Please visit the following page:

Install Nginx Web Server on Arch Linux|EndeavourOS

Congratulations! Nginx has been installed successfully installed.

Finale

This guide demonstrated how to set up the Nginx web server on Arch Linux| EndeavourOS. This should have been useful, we hope.

Read more about Nginx.

See more:

- Advertisment -

Recent posts

LEAVE A REPLY

Please enter your comment!
Please enter your name here