Thursday, September 6, 2018

Nginx: Tips and Tricks

What is the Configuration File for Nginx and where it can be in UNIX like Systems?

Configuration file is named nginx.conf and placed in the directory;
 /usr/local/nginx/conf, /etc/nginx     or
/usr/local/etc/nginx          depends on distribution.



what are the configuration files available for Nginx ?

       1.      Default configuration directory: /etc/nginx/
2.      Default SSL and vhost config directory: /etc/nginx/conf.d/
3.      Default log file directory: /var/log/nginx/
4.      Default document root directory: /usr/share/nginx/html
5.      Default configuration file: /etc/nginx/nginx.conf
6.      Default server access log file: /var/log/nginx/access.log
7.      Default server access log file: /var/log/nginx/error.log

       How to check nginx syntax or configuration:

         sudo /etc/init.d/nginx configtest

           
        How to Reload Nginx:


         sudo /etc/init.d/nginx reload




No comments:

Post a Comment

5 Strategies for Getting More Work Done in Less Time

Summary.    You’ve got more to do than could possibly get done with your current work style. You’ve prioritized. You’ve planned. You’ve dele...