Nginx basic

Posted under » Apache on 24 June 2019

Nginx can also run node.js as a reverse proxy

To stop and start

1
2
3
service nginx stop
service nginx start
sudo /etc/init.d/nginx restart

Location of files

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# 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.

1
2
3
4
5
6
7
8
# 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