Welcome! Log In Create A New Profile

Advanced

proxy_pass works on main page but not other pages

October 30, 2022 01:22PM
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;

       }

```


```

_______________________________________________
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-leave@nginx.org
Subject Author Posted

proxy_pass works on main page but not other pages

biscotty October 30, 2022 01:22PM

Re: proxy_pass works on main page but not other pages

biscotty October 30, 2022 01:42PM

Re: proxy_pass works on main page but not other pages

biscotty October 30, 2022 01:58PM

Re: proxy_pass works on main page but not other pages

Francis Daly November 01, 2022 07:36PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 309
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready