Nginx basic

Posted under » Apache on 24 June 2019

Nginx can also run node.js as a reverse proxy

To stop and start

service nginx stop
service nginx start
sudo /etc/init.d/nginx restart

Location of files

# config
/etc/nginx/nginx.conf

#sites config
/etc/nginx/conf.d/yoursite.conf

# logs
/var/log/nginx/

#php ini
/etc/php.ini

#php fpm
/etc/php-fpm.d/www.conf

I've experience a case on Centos where php-fpm doesn't start automatically after reboot. To fix this.

# see the status
systemctl status php-fpm.service

#if disable you should enable it 
systemctl enable php-fpm.service

#manually start or stop
systemctl start php-fpm

Too lazy to do the whole thing. Maybe you can read this.

web security linux ubuntu python django git Raspberry apache mysql php drupal cake javascript css AWS data