proxy - nginx proxypass with multiple locations -


i try setup nginx such proxies requests multiple locations. e.g. /location1 , /location2 should both proxied http://localhost:8080. can't figure out how configure without using multiple location blocks. tried:

location /(location1|location2) {     proxy_pass http://localhost:8080/ } 

which give 404s. , i've tried:

location ~ /(location1|location2) {      proxy_pass http://localhost:8080/ } 

which thrown error regular expressions not allowed proxy pass.

is possible configure proxy without having create multiple location blocks?

apparently missing slash , ';'. try this:

location ~ (/location1|/location2) { proxy_pass http://localhost:8080; }


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -