0

I can see in my backend application logs that we're sending 503 responses. Yet I cannot find the corresponding log lines in the NGINX error.log or access.log.

Do I need extra configuration to include 503 responses in the logs? Aren't all responses being logged to /var/log/nginx/access.log?

Relevant NGINX configuration:

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

[...]

server {

   [...]

   location / {
    proxy_pass http://localhost:8080;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
    proxy_set_header X-Real-IP $remote_addr;
}
  • Did you override the access_log in that server block? – Michael Hampton Feb 1 at 13:41
  • No, just the default logging settings in the default nginx.conf file. – Edi Feb 1 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.