Skip to content

Troubleshooting

Table of Contents * Gather Basic Details

Gather Basic Details

The version of nginx or openresty is very important.

$ nginx -V

Log file typically found at: * /var/log/nginx/error.log * /usr/local/openresty/nginx/logs/error.log

Gather important config information related to the issue. Often there is a location involved with the problem.

Somewhat complex example of locations with an auth directive:

    # Authentication Based on Subrequest Result
    location /private/ {
        auth_request     /auth;
        auth_request_set $auth_status $upstream_status;
        proxy_pass      http://127.0.0.1:80/private/;
    }

    # proxy_pass_request_body turns off passing the post body
    # request body is discarded for authentication subrequests
    location = /auth {
        internal;
        proxy_pass      http://127.0.0.1:80/inspect/;
        proxy_pass_request_body off;
        proxy_set_header        Content-Length "";
        proxy_set_header        X-Original-URI $request_uri;
    }