I'm configuring a cloud server which use NGINX as reverse proxy to serve different applications on different URI (all the applications are on the same wildfly standalone instance). To be more specific i've a JSF application with a contextroot, let's say, /jsfcontext and i've set up a NGINX location like /mypublicuri. What happens is that when I navigate to https://myserver.com/mypublicuri/index.xhtml i receive the following error: /mypublicuri/index.xhtml Not Found in ExternalContext as a Resource. I'm pretty sure it's related to a missing internal redirect route or some kind of "hack" that i need to specify in order to make everything work but i'm a newbie in NGINX and I don't know how to properly set everything up. Thanks for the help Cheers
Read NGINX documentation but my lack of english knowledge makes difficoult to understand what should I have to do
My actual NGINX config
server {
    server_name myserver.com www.myserver.com;
    access_log /usr/share/logs/access.log;
    error_log /usr/share/logs/error.log;
    location / {
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_intercept_errors on;
        location /anotherworkingapp {
            add_header Allow "GET, POST, HEAD, PUT, DELETE" always;
            proxy_pass http://127.0.0.1:8080$request_uri;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "Upgrade";
        }
        location /mypublicuri {
            proxy_pass http://127.0.0.1:8080/jsfcontext$request_uri;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "Upgrade";
        }
    }
}