Wrong redirects when using Webmin/Virtualmin behind proxy

Hi all,

I want my customers to access webmin/virtualmin on a standard port, while keeping a safe alternative in case apache isn't running. Thus, Webmin is running on 127.0.0.1:10000 without SSL, and apache proxying it to port 443 with SSL encryption.

However, when Webmin redirects, it generates wrong URLs (which is to be expected). Instead of redirecting to http://host:10000/ the URL should read https://host/

Is there anything I could do to configure this? This issue keeps me from deploying this as standard config for all users. Kind regards,

Christian

Status: 
Closed (fixed)

Comments

BTW: This applies to the login screen (when sessions are enabled) which isn't a major issue. But it also occurs with the "Running processes" module.

How have you setup the proxy in Apache? You need directives like :

ProxyPass / "http://localhost:10000/"
ProxyPassReverse / "http://localhost:10000/"

it sounds like the ProxyPassReverse may be missing..

Hi Jamie,

I followed the instructions and have both ProxyPass and ProxyPassReverse mappings pointing to localhost:10000

I did however leave a ProxyPreserveHost directive in there, too. Removing it certainly fixes the issue. Note to self: RTFM, it might contain valuable insights how Apache directives actually work ;-)

Regards,

Christian