I've created a reverse proxy for webmin through nginx to run webmin at [site domain]/webmin instead of port 10000 ([site domain]:10000).
When I go to [site domain]/webmin, the login page shows up as you'd expect-- but when I try to login, the login page simply reloads (no error message, no success). The login page has all assets (images, js, etc.) properly loaded.
Looking at /var/webmin/miniserv.log, I'm seeing:
105.23.149.76 - - [26/Jul/2015:14:07:13 -0400] "POST //session_login.cgi HTTP/1.0" 401 2892
Note the 401 (not authorized) error status.
Before I set up the reverse proxy, successful logins looked like this:
145.23.98.124 - - [26/Jul/2015:13:34:38 -0400] "GET /admin/config/session_login.cgi HTTP/1.1" 401 2840
145.23.98.124 - root [26/Jul/2015:13:34:44 -0400] "POST /session_login.cgi HTTP/1.1" 200 871
My system auth log isn't getting pinged by the login attempts, so webmin isn't even making the login call via PEM (it's getting stopped before that).
Does anybody know what could explain this 401 error in my log, or more generally, what might be keeping webmin login from working?
Many thanks!
nginx config:
server {
listen 443 ssl;
server_name site.example.com;
ssl on;
ssl_certificate [ssl cert].crt;
ssl_certificate_key [ssl key].key;
ssl_protocols [ssl protocols];
ssl_ciphers [ssl ciphers];
location /webmin {
proxy_redirect http://127.0.0.1:10000/ https://site.example.com/webmin/;
proxy_pass http://127.0.0.1:10000/;
proxy_set_header Host $host:$server_port;
}
}