So I have configured a reverse proxy using nginx 1.18.0. I am able to access my desired website through the reverse proxy already, but some requests are failing (eg. for the favicon), because the location /app3/ is not included into the request url. Which setting is missing from my conf to make this work? Why are some request working, while others are not?
Please note I am not in control of the target application. It is hosted on the same local network as the nginx, but on a different host. I cannot make any changes there.
Screenshot for reference: https://ibb.co/3WVfMH7
server { listen 80 default_server; listen [::]:80 default_server; root /var/www/html; server_name myservername; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Accept-Encoding ""; gzip_static off; location /app3/ { proxy_set_header Accept-Encoding ""; sub_filter 'href="/' 'href="/app3/'; sub_filter 'src="/' 'src="/app3/'; sub_filter 'action="/' 'action="/app3/'; sub_filter_once off; proxy_pass http://172.31.1.102/; } }