Setting up Reverse Proxy to local server using Virtualmin GUI

OS type and version: Rocky Linux 9.2
Virtualmin version: 7.7

I have Virtualmin running on a Rocky Linux VM, exposed to the internet on my router. The VM is running on a TrueNAS server, which also has several other VMs / Jails on it from before I discovered Virtualmin.

Prior to Virtualmin, I had a simple Caddy server acting as a Reverse Proxy for the various Jails I had running. I’m in the process of moving off that setup, and would like to use Virtualmin to set up a handful of sites to act as those proxies instead. In particular, I’d like to serve up https://cloud.aiskon.net to point to a local server, http://10.0.0.242

Here’s the settings for the Proxy tab in Virtualmin, but when I browse to the site, I get the default Virtualmin page instead of any sort of Proxying:

I did look at the Bobcares page for proxying, but it doesn’t match the current version of Virtualmin, it seems. Any guidance on what I am missing?

Thank you!

Please do not try to follow any advice on the bobcares website. It is generally wildly wrong, either through malice or ignorance.

1 Like

Got it, thank you. I found the reference on the Virtualmin forums, if you want to make that warning there as well:

1 Like

I’ve edited that post to remove the link. I assume the bobcares website is blogspam, written by someone with little to no comprehension of what they’re writing…just sort of faking it. Every article about Virtualmin/Webmin I’ve seen there has been nonsense.

Checking back on this - what’s the best way to set up a reverse proxy using Virtualmin? Is this something in the GPL version, or is this reserved for the Pro version only?

@GJSchaller hi,

I am unfortunately experienced with apache on this regards, also I am GPL, I think PRO version have this very simplified within virtualmin menu and apply button. I can help you if you running apache. I am not familiar with nginx as I stopped using it since centos went dead.

@unborn - thank you, I am running Apache, so any advice would be useful. If there’s confirmation on if this is possible using the GUI under GPL, or a Pro only feature, I’d appreciate it so it’s on the record. (I’m getting ready to go Pro once I shut down my hosted server, but I want to make sure I know what I am getting into first.)

@GJSchaller on GPL you have option for proxying just like you see, same as me. I run my git server on port 3000 which is accessible only on local network. On GPL GUI I believe there is nothing where you can edit that source domain can receive lets encrypt but pass everything else via proxy. I had client who had PRO version and proxy settings there where bit different and easier to manage - I would say more options which is understandable. Note, Im not reseller nor trying to move you anywhere from GPL, Im just stating facts.

My production server sits on network and necessary ports are open to WAN. I am proxying my git.domain… to 192.168.1…:3000 and its been working for years for me.

On my virtualmin Ive setup proxy as described for mentioned subdomain git.domain.com and then I’ve had to edit apache config file for that subdomain to exclude .well-known folder so lets encrypt could proceed. It was 3 or perhaps 4 lines? After applying this everything worked.

PS: I think you can try out PRO version - If I remember correctly they do have like trial or money back or something. However if you would like to do on gpl version, editing file or two by hand might be necessary. PRO version is like GPL on massive steroids and have much more to offer. Best people to ask if pro version is different regards proxying would be vm people.

I’ve upgraded to Pro, and am looking into setting this up correctly now.

What’s the best / documented way to set up a Reverse Proxy to another, internal website? (i.e. - I need to proxy to 10.0.0.242 on my LAN, and make it visible from the outside).

Is there a different spot to post for Pro questions, or a specific person / group to tag?

Thank you!

Making a note of this for future forum users - it is, indeed, a feature in Pro. At the time I was looking for it, it was bugged, but my quest uncovered the bug, and it should be working in the next release after 7.7.

hi - sorry for late reply - I was on holidays to see my mom and father and brother. I do know pro version have advanced features regards auth - but there is nothing stopping you to do this in configuration level for free. What bug you are talking about? There is nothing mentioned in git repo nor on website… can you elaborate a bit please?

This was resolved with a Pro ticket, a config needed to be enabled in Apache (ProxyPreserveHost). This feature will be added in the next release of Apache.

of course - it was.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.