I am trying to serve Icinga (in a local LAN with ip 10.10.10.7) through a Nginx reverse proxy. The goal is to land on the correct page without having to specify the subfolder /icingaweb2. Here is my conf, which does not work. The commented line works, but it requires specifying the subfolder. What am I doing that is wrong?
server {
server_name icinga.mydomain.com;
listen 443 ssl;
listen [::]:443 ssl; try_files $uri $uri/ =404;
auth_basic "Restricted Content";
auth_basic_user_file /etc/nginx/.htpasswd;
location / {
#proxy_pass http://10.10.10.7;
proxy_pass http://10.10.10.7/icingaweb2$request_uri;
}
}