Difference between revisions of "/etc/nginx/nginx.conf"

From wikieduonline
Jump to navigation Jump to search
Line 40: Line 40:
 
* [[Apache web server]]
 
* [[Apache web server]]
 
* [[Reverse proxy]]
 
* [[Reverse proxy]]
* [[Nagios]]: [[Check http]]
+
* [[Nagios]]: <code>[[check_http]]</code>
  
 
[[Category:Web server software]]
 
[[Category:Web server software]]

Revision as of 18:18, 27 December 2019

wikipedia:Nginx web server that was written in 2004 as an alternative to popular Apache web server.

/etc/nginx/nginx.conf
/etc/nginx/conf.d/default.conf

Nginx logs (See also Nginx change log)

  • Error log file: /var/log/nginx/error.log
  • Access log file: /var/log/nginx/access.log
  • Logrotate: /etc/logrotate.d/nginx
  • journalctl -u nginx
journalctl -u nginx | grep emerg

Nginx Sample Configurations

Example of the simplest nginx possible configuration file, listening on default http port: 80.

/etc/nginx/conf.d/default.conf
server {
    listen 80;
    root /path/to/your/html_files;
}


Linux Nginx Operation on systemd distributions

  • Verify/Test Configuration: nginx -t
  • Status: systemctl status nginx
  • Start: systemctl start nginx
  • Stop: systemctl stop nginx
  • Restart: systemctl restart nginx (See also: nginx -t)

Activities

See also

Advertising: