Difference between revisions of "/etc/nginx/nginx.conf"
Jump to navigation
Jump to search
Line 6: | Line 6: | ||
:<code>/etc/nginx/conf.d/default.conf</code> | :<code>/etc/nginx/conf.d/default.conf</code> | ||
− | [[Nginx logs]] | + | [[Nginx logs]] (See also [[Nginx change log]]) |
* Error log file: <code>/var/log/nginx/error.log</code> | * Error log file: <code>/var/log/nginx/error.log</code> | ||
* Access log file: <code>/var/log/nginx/access.log</code> | * Access log file: <code>/var/log/nginx/access.log</code> |
Revision as of 09:48, 26 December 2019
wikipedia:Nginx web server that was written in 2004 as an alternative to popular Apache web server.
- Official documentation: https://nginx.org/en/docs/
- Configuration Files:
/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
journalctl -u nginx
journalctl -u nginx | grep emerg
Contents
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
- Track Application Response time in Nginx
- Enable status page in Nginx to get information about active connections and other parameters: https://easyengine.io/tutorials/nginx/status-page/ and test it:
curl http://127.0.0.1/nginx_status
- Read Nginx Change log
See also
- Web server: Nginx:
/etc/nginx/nginx.conf
,nginx -t
, Nginx logs, Nginx change log, PHP,php-fpm
, Let's encrypt, Nginx directives, Reverse Proxy, Configure HTTP redirection Nginx, Return,proxy_pass (Reverse proxy)
,ngx_http_rewrite_module
,/etc/nginx/sites-enabled/
,error.log
,access.log
,/nginx status
, AIO - Apache web server
- Reverse proxy
- Nagios: Check http
Advertising: