Friday, December 9, 2016

Nginx Error Logging

https://www.nginx.com/resources/admin-guide/logging-and-monitoring/

http://mark-kay.net/2013/12/16/setting-up-a-central-logging-server-with-rsyslog/
#!/etc/rsyslog.d/40-nginx.conf
$ModLoad imfile
$InputFileName /var/log/nginx/error.log
$InputFileTag nginx:
$InputFileStateFile stat-nginx-error
$InputFileSeverity warning
$InputFileFacility local7
$InputRunFileMonitor
$InputFileName /var/log/nginx/access.log
$InputFileTag nginx:
$InputFileStateFile stat-nginx-access
$InputFileSeverity info
$InputFileFacility local7
$InputRunFileMonitor
$InputFilePollInterval 10
:syslogtag,isequal,"nginx:" /var/syslog/nginx.log

https://www.digitalocean.com/community/tutorials/understanding-the-nginx-configuration-file-structure-and-configuration-contexts

https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-16-04
https://www.cyberciti.biz/faq/nginx-linux-restart/

No comments:

Post a Comment