Installing NGINX

On Debian systems,

apt install nginx
systemctl status nginx
netstat -antupe --inet --inet6 | grep LISTEN | grep 80

cp -pi /etc/nginx/sites-available/default /etc/nginx/sites-available/default.dist
cp -pi /etc/nginx/nginx.conf /etc/nginx/nginx.conf.dist
ls -lhF /var/www/html/index.nginx-debian.html
rm -f /var/www/html/index.nginx-debian.html
echo "<p>nothing here" > /var/www/html/index.html

On RHEL systems, make sure the EPEL repo is available and proceed,

yum install nginx
netstat -antupe --inet --inet6 | grep LISTEN | grep 80
systemctl start nginx
systemctl enable nginx

cp -pi /etc/nginx/nginx.conf /etc/nginx/nginx.conf.dist
ls -alhF /usr/share/nginx/html/

Or to build it from source, see NGINX from scratch

As a result you will have confs and logs in differing locations

#RHEL and Debian
confdir=/etc/nginx/conf.d
logdir=/var/log/nginx

#from scratch
confdir=/usr/local/nginx/conf.d
logdir=logs

and differing user accounts for the daemon

#RHEL and Debian
grep www-data /etc/passwd
grep www-data /etc/group

#from scratch
grep www /etc/passwd
grep www /etc/group

HOME | GUIDES | BENCHMARKS | html