server {
listen 80;
server_name 198.255.25.1;
root /sites/demo;
location /apple.png {
access_log /var/log/nginx/secure.access.log;
access_log /var/log/nginx/access.log;# request will be logged in 2 locations}
location /orange.png {
log_not_found off;
access_log off;# no log for this location }}
Useful reverse proxy upstream logs
Step 1: Run vim /etc/nginx/nginx.conf, add below log_format inside http { … }