/etc/nginx/nginx.conf

From wikieduonline
Revision as of 08:33, 26 December 2019 by Welcome (talk | contribs)
Jump to navigation Jump to search

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

  • Error log file: /var/log/nginx/error.log
  • Access log file: /var/log/nginx/access.log
  • journalctl -u nginx

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

Activities

See also

Advertising: