hello people
been slamming my head off a wall for some time with this config... i have more of an apache background but persevering with NGINX for this project!
basically, I have created a simple reverse proxy to serve http sites as https, and it works very well using the following config
location /subdirectory/ {
sub_filter '=/"' '="'; #remove /
sub_filter_once off;
proxy_pass http://subdirectory.domain.com/;
}
what i was hoping to do was expand this with regex
location ~* ^/(.*)/$ {
sub_filter '=/"' '="'; #remove /
sub_filter_once off;
proxy_pass http://$1.domain.com/;
}
but this returns 502 bad gateway.
have tried various configs, and cannot get this to resolve properly at all...
fingers crossed for some insight :)
been slamming my head off a wall for some time with this config... i have more of an apache background but persevering with NGINX for this project!
basically, I have created a simple reverse proxy to serve http sites as https, and it works very well using the following config
location /subdirectory/ {
sub_filter '=/"' '="'; #remove /
sub_filter_once off;
proxy_pass http://subdirectory.domain.com/;
}
what i was hoping to do was expand this with regex
location ~* ^/(.*)/$ {
sub_filter '=/"' '="'; #remove /
sub_filter_once off;
proxy_pass http://$1.domain.com/;
}
but this returns 502 bad gateway.
have tried various configs, and cannot get this to resolve properly at all...
fingers crossed for some insight :)