I'm setting up a reverse proxy that connects to different localhost ports with different services.
This is the NGINX site configuration:
server {
listen 0.0.0.0:80;
root /var/www/;
index index.html index.php;
include /etc/nginx/include/php;
location /Random_Folder {
rewrite ^/Random_Folder(.*) /$1 break;
proxy_redirect off;
proxy_pass http://localhost:9000;
}
}
I can see that by accessing to: "http://myserver.com:80/Random_Folder" the request go to "http://localhost:9000" as it should. But additional resources on the page fail to load (JS, CSS) and they all point to the root document folder "/" instead of "/Random_Folder".
Is there anything in the configuration I'm missing to make this fully functional ?
Thanks !