Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Help with reverse proxy config

$
0
0
Hey there,

I'm trying to simply a reverse proxy config and cement my own understanding. Here's the scenario:

I have a test page at http://domain.com/testpage

that contains a script block with "testscript/somejavascript.js"

This script block after testing will also end up on http://domain.com main page...

My nginx config looks like

location ~* /testscript/ {
proxy_pass https://someotherwebserver;)


With only that config, calls to http://domain.com/testpage/testscript/whatever.js fail with a 404 as nginx is also passing the /testpage/ URI to the backend webserver.

Ultimately, I would like to have any requests that contain /testscript/ to be passed to the root of someotherwebsever and I'm not sure how to accomplish this as with regex I can't append the trailing / to my proxy_pass.


Thanks.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>