Sep 6th, 2009
Webmin In A Sub-Directory Via A Proxy
If you just want Webmin to be accessible via an URL subdirectory (like /webmin) on an Apache server without going to the trouble of configuring Apache to run the CGI scripts directly, there is a simpler method that can be used.
This is also useful if your system is only accessible on port 80, and you want access to both Webmin and a normal website. The steps to follow are :
Make sure mod_proxy is installed on your Apache webserver.
Add the following directives to the Apache configuration file:
ProxyPass /webmin/ http://localhost:10000/
ProxyPassReverse /webmin/ http://localhost:10000/
<Proxy *>
allow from all
</Proxy>
Add the lines webprefix=/webmin and webprefixnoredir=1 to /etc/webmin/config.
In /etc/webmin/config, add the line referer=apachehost, where apachehost is the hostname from the URL used to access Webmin via Apache.
If the referer line already has some hosts listed, add apachehost to it.
Re-start Apache to apply the configuration.
All requests to /webmin on the Apache server will then be passed through to the Webmin server on localhost port 10000.
All features should work fine, including themes, with the exception of IP access control (because as far as Webmin is concerned, all connections will be coming from localhost).