Question

Reverse proxy with Prism


Badge +1

I am trying to have Nutanix portal sit behind a NGINX reverse proxy. I have it sort of working. If I try and go to nutanixpc.domain.com, it will redirect to nutanixpc.domain.com:9440/console. I tried adding a redirect but it doesn’t seem to be working. If I type the path https://nutanixpc.domain.com/console, then it works.

 

server {
listen 443 ssl http2;
server_name nutanixpc.domain.com;

ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/domain.com/chain.pem;
include snippets/ssl.conf;
include snippets/letsencrypt.conf;

location = / {
return 301 https://nutanixpc.domain.com/console;
}

location / {
proxy_pass https://pcconsole.domain.com:9440;
proxy_intercept_errors on;
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 X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}

 


0 replies

Be the first to reply!

Reply