Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 985 Bytes

installation.md

File metadata and controls

43 lines (31 loc) · 985 Bytes

Install Nginx

Install Nginx, start the service, enable it at boot, and verify that the web server is responding.

RHEL, Rocky Linux, or AlmaLinux

sudo dnf install nginx
sudo systemctl enable --now nginx

Ubuntu or Debian

sudo apt update
sudo apt install nginx
sudo systemctl enable --now nginx

Verify the installation

nginx -v
sudo nginx -t
sudo systemctl status nginx
curl -I http://localhost

Continue when the configuration test is successful and curl returns an HTTP response.

Main locations

Purpose Standard path Custom example
Main configuration /etc/nginx/nginx.conf /Nginx/nginx.conf
Logs /var/log/nginx/ Defined in the custom configuration
PID Distribution default /Nginx/pid/nginx.pid

Next steps