proxy_pass works on main page but not other pages

Brian Carey biscotty666 at gmail.com
Sun Oct 30 17:20:35 UTC 2022


Hi,

I have an app running at port 8239 on biscotty.me. If I access the app 
directly everything works as expected.

I am able to use proxy_pass to forward https:/biscotty.me/striker to the 
main page of my app. The problem is that all of the links in the app 
result in a page not found error from the apache server handling 
requests to /. So it seems like the port number information is somehow 
being lost in translation?

This is my conf:

```

location /striker {
                rewrite /striker/(.*) /$1 break;
                proxy_pass http://192.168.0.238:8239;

proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $remote_addr;
                proxy_set_header Host $host:8239;

        }

        location / {
                proxy_pass http://192.168.0.238:8080/;
                proxy_buffering on;
                proxy_buffers 12 12k;
                proxy_redirect off;

                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $remote_addr;
                proxy_set_header Host $host:8080;

        }

```


```

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20221030/0c729c33/attachment.htm>


More information about the nginx mailing list