Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have Webmin configured to listen on localhost:1000 and nginx configured to listen on my.domain.tld:80 with reverse proxy pointing to Webmin. This configuration works fine but sometimes I get 404 errors and HTTP headers say that this is Webmin's miniserv puts 302 redirects into them:

HTTP/1.0 302 Moved Temporarily Date: Sun, 3 Jan 2010 11:38:46 GMT Server: MiniServ/0.01 Connection: close Location: http://my.domain.tld:10000/webmin/

Can you advice on how to disable this behavior?

share|improve this question

closed as off-topic by HopelessN00b Jan 14 '15 at 1:33

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

This question appears to be off-topic because it is about working with a service provider's management interface, such as cPanel. – HopelessN00b Jan 14 '15 at 1:33
up vote 4 down vote accepted

I had a very similar problem. However, my problem was specifically that after you login to Webmin, it would redirect to the non-proxied address and port.

To further illustrate, assume I wanted webmin to appear to the outside post-proxy on '', but it's really running on ''. Going to the first address would display the login page, but redirect me to the second address (302 Moved Permanently). I could then type or paste the first address, and all would work as though I was logged in.

I tried following the directions on the Webmin wiki, your suggestion above, and various other suggestions. Then I found the solution. I needed to add another ProxyReversePass to my Apache configuration, to catch the URL in the redirect.

ProxyRequests Off
ProxyPreserveHost On
SSLProxyEngine On

ProxyPass /admin/webmin/
ProxyHTMLURLMap https://localhost:10000 /admin/webmin

<Location /admin/webmin/>
 ProxyHTMLExtended On
 SetOutputFilter proxy-html
 ProxyPassReverse https://localhost:10000/

Of course, in /etc/webmin/config I have webprefix="/admin/webmin" and webprefixnoredir=1. I wanted SSL protection over my local LAN, so I left it SSL enabled and did the SSL proxy thing. Hope this helps as a possible solution to anyone experiencing this issue.

I was so desperate I was trying to modify and even thought about breaking out mod_rewrite.

share|improve this answer

Okay, I figured it out myself. When you configure Webmin to bind to localhost only you should use the following command in miniserv.conf:


This is insted of host=localhost and port=1000. I hope it will help someone else too.

share|improve this answer

Thanks, the sockets option almost got me there, but I’m using SSL on the front end (which handles certificates better) and I’m coming in on a different port on the front end, so I also needed to add:

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.