Access Vsphere web client using Nginx reverse proxy

We have a deployment scenario where in we want to expose a public url and behind that access vcenter web client through Nginx using reverse proxy. Currently we are only able to access the login page which gets stuck when we enter the credentials.

Following is our conf file:

server { listen 80; server_name localhost; #access_log logs/host.access.log main;

    location / {
        root   html;
        index  index.html index.htm;
        resolver DNS server;
        proxy_pass vecenter IP;
        proxy_redirect off;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Doing a little searching I’ve found that a simple reverse proxy will not work for vcenter but i was able to find this repository which includes a sample nginx configuration and the other things needed to proxy vcenter.

The following line fixes the redirect issue. Now I’m getting a 404 error for /websso/SAML2/SSOSSL. The link it’s trying to go to looks just the same as when it’s working locally minus using the IP. Not yet working, but at least I know I’m definitely getting to the server from an external source.


Ok, I was testing externally using a VPN. I’m testing from an external system today, and it’s not working. It looks like it was still saying, but it was actually using I’ve also noticed the HTTPS cert isn’t showing as secure. I’ll follow up if I ever figure out why it doesn’t seem to actually be proxying appropriately.