2

I have a fan-out nginx config with a bunch of services running on different port.

I'm having a lot of difficulty getting the services to behave as expected when accessed via nginx; they behave as expected when hit locally.

How can I see what URI/URL is being passed to the proxy precisely?

The relevant bit of the nginx config is below:

    location ~ ^/auth/(.*)$ {
            #proxy_set_header Host api.flourishzone.uk/auth/ ;
            proxy_set_header Host $host;
            add_header X-debug-message "URI  ${request_uri}";
            add_header X-debug-message "URI passed thru ${uri}";
            proxy_pass http://127.0.0.1:8080/auth/$1;
    }
David Boshton
  • 2,555
  • 5
  • 30
  • 51
  • Check the access logs on the remote servers. Show us your nginx config, so we can see if there are any rewrite rules in place or anything that modifies the request. Also check [this](https://stackoverflow.com/questions/18627469/how-to-record-reverse-proxy-upstream-server-serving-request-in-nginx-log), the answer not marked as accepted is showing you a good way on how to setup certain logs between nginx and the remote. Hope it helps. – Raul Oct 11 '19 at 06:08
  • Does this answer your question? [How to record reverse proxy upstream server serving request in Nginx log?](https://stackoverflow.com/questions/18627469/how-to-record-reverse-proxy-upstream-server-serving-request-in-nginx-log) – Serhii Matrunchyk Jun 12 '22 at 11:20

0 Answers0