[GH-ISSUE #549] Nginx Reverse Proxy as Proxmox VM #461

Closed
opened 2026-02-26 06:32:56 +03:00 by kerem · 3 comments
Owner

Originally created by @fhm0514 on GitHub (Aug 8, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/549

I have the Nginx Reverse Proxy as docker container in a KVM client in a Proxmox environment. I only have one (1) Public IP, and port 80,443 is forwarded to KVM containing the nginx reverse proxy. What is the configuration to reverse proxy to point to the Proxmox host. I want to do this so Proxmox can renew it's own LetsEncrypt Certificates.

My configuration is as shown below

proxmox

Originally created by @fhm0514 on GitHub (Aug 8, 2020). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/549 I have the Nginx Reverse Proxy as docker container in a KVM client in a Proxmox environment. I only have one (1) Public IP, and port 80,443 is forwarded to KVM containing the nginx reverse proxy. What is the configuration to reverse proxy to point to the Proxmox host. I want to do this so Proxmox can renew it's own LetsEncrypt Certificates. My configuration is as shown below ![proxmox](https://user-images.githubusercontent.com/11626044/89717644-233d8e00-d9eb-11ea-821e-903df0c9176f.jpg)
kerem 2026-02-26 06:32:56 +03:00
Author
Owner

@gregfr commented on GitHub (Aug 11, 2020):

Do you have a public name associated to your public IP? How do you plan to access "other services"? Why do you want Proxmox to handle it own certificate?

You can only have process on port 80 (used by LE) so the easiest setup would probably to:

  • have one name for the main Apache server and one name for each of the services server
  • create 2+ proxy hosts in NPM, one with the main name in "domain name" and 192.168.5.100 as "forward hostname/IP", the others with the service name and 192.168.5.101 (for example) as the forward IP (probably with forward port 80, but it depend on your Apache and "other services" configuration.

It doesn't make a lot of sense to have the "internal" services (apache + other) answer with https, so you better leave NPM the only HTTPS server: it can easily generate a LE certificate for you.

I discovered NPM a few minutes ago and I already have a functional setup like this.

If you want 2 entities to have their own LE certs on the same IP, I think you need to use other LE modes (like DNS validation).

<!-- gh-comment-id:672202533 --> @gregfr commented on GitHub (Aug 11, 2020): Do you have a public name associated to your public IP? How do you plan to access "other services"? Why do you want Proxmox to handle it own certificate? You can only have process on port 80 (used by LE) so the easiest setup would probably to: - have one name for the main Apache server and one name for each of the services server - create 2+ proxy hosts in NPM, one with the main name in "domain name" and 192.168.5.100 as "forward hostname/IP", the others with the service name and 192.168.5.101 (for example) as the forward IP (probably with forward port 80, but it depend on your Apache and "other services" configuration. It doesn't make a lot of sense to have the "internal" services (apache + other) answer with https, so you better leave NPM the only HTTPS server: it can easily generate a LE certificate for you. I discovered NPM a few minutes ago and I already have a functional setup like this. If you want 2 entities to have their own LE certs on the same IP, I think you need to use other LE modes (like DNS validation).
Author
Owner

@fhm0514 commented on GitHub (Aug 13, 2020):

Hi, thanks for the reply. I have Proxmox as the host to have multiple services in its own VM within the Proxmox environment including the NGINX proxy. The Apache Server is for my other websites that I host using ISPConfig which used to be the one that was front and center before the NGINX proxy imlementation. In order for it to all work, I had to forward all traffic for port 80 and 443 to my VM, before it was the ISPConfig/Apache and now it is towards the NGINX proxy server.

To renew the LE certs for Proxmox, I used to temporarily turn off the port forward to allow port 80 to Proxmox then turn it back on again. However, since the nginx proxy is redirecting traffic for port 80 and 443 to my other VMs (ISPConfig, Nextcloud, Plex, etc), I wanted it to point to the host as well. I had nginx proxy handle all the LE Certs for my other VMs although I am still having issues with IOS devices with nginx proxy fronting for Apache which is whole other topic in my other post. I didn't want the same for Proxmox, as I want Proxmox to be as separate from the whole environment as much as possible, just in case.

Anyway, I was able to come up with a solution of just simply registering the hostname of my Proxmox in nginx and redirecting it to the port 80 of the local ip of my Proxmox (192.168.5.1) and it all worked out, no SSL just forward it back to the host. I hope that helps anyone doing the same thing.

Thanks

<!-- gh-comment-id:673397667 --> @fhm0514 commented on GitHub (Aug 13, 2020): Hi, thanks for the reply. I have Proxmox as the host to have multiple services in its own VM within the Proxmox environment including the NGINX proxy. The Apache Server is for my other websites that I host using ISPConfig which used to be the one that was front and center before the NGINX proxy imlementation. In order for it to all work, I had to forward all traffic for port 80 and 443 to my VM, before it was the ISPConfig/Apache and now it is towards the NGINX proxy server. To renew the LE certs for Proxmox, I used to temporarily turn off the port forward to allow port 80 to Proxmox then turn it back on again. However, since the nginx proxy is redirecting traffic for port 80 and 443 to my other VMs (ISPConfig, Nextcloud, Plex, etc), I wanted it to point to the host as well. I had nginx proxy handle all the LE Certs for my other VMs although I am still having issues with IOS devices with nginx proxy fronting for Apache which is whole other topic in my other post. I didn't want the same for Proxmox, as I want Proxmox to be as separate from the whole environment as much as possible, just in case. Anyway, I was able to come up with a solution of just simply registering the hostname of my Proxmox in nginx and redirecting it to the port 80 of the local ip of my Proxmox (192.168.5.1) and it all worked out, no SSL just forward it back to the host. I hope that helps anyone doing the same thing. Thanks
Author
Owner

@gregfr commented on GitHub (Aug 14, 2020):

Nice to see you solved your problem. Another solution would be to use DNS-based challenges.

<!-- gh-comment-id:674119735 --> @gregfr commented on GitHub (Aug 14, 2020): Nice to see you solved your problem. Another solution would be to use DNS-based challenges.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#461
No description provided.