"login to usermin" redirects to localhost

Hello I configured virtualmin and usermin behind apache proxies. (Following the “via proxy” conf described here)

The only thing that does not seem to work is when I go to a virtual server > edit users > (user) > “login to usermin”. This will redirect me to localhost:20000

This makes sense because the webmin server is called by apache through localhost. How can I change this behaviour?

.
|SYSTEM INFORMATION|
Operating system Debian Linux 10
Webmin version 1.981 Usermin version 1.823
Virtualmin version 6.17-3 Authentic theme version 19.83-2

Time on system Thursday, November 4, 2021 11:39 AM
Kernel and CPU Linux 4.19.0-17-amd64 on x86_64
Processor information AMD EPYC 7702P 64-Core Processor, 4 cores System uptime 10 days, 17 hours, 05 minutes

@jccb,

Why do you have Virtualmin (Webmin) running through a proxy? Virtualmin has it’s own web server and does not use Apache nor Nginx for it’s GUI.

Typically someone creates a reverse proxy for websites, not Virtualmin itself.

Having virtualmin behind a proxy is actually pretty common to avoid the “ugly” port :10000

My problem is related to Usermin. When I click on “login to usermin” it redirects to localhost:20000 I want this to redirect to the url of usermin, however I can’t find where can I configure this. Eventually it is a bug, because everything is working normally, including usermin.

usermin/webmin need to be told and handled that they are behind a reverse proxy.

See: Webmin behind reverse proxy redirects to 10000 port · Issue #1027 · webmin/webmin · GitHub

@jccb,

Not technically a bug, because it’s forwarding you to the address you setup. I assume behind your proxy “localhost” is the hostname you have provisioned, and usermin does technically operate on port 20000 regardless as you’re proxying “webmin” which also technically runs on port 10000 even though you are likely referencing it by your proxied port.

Basically “Webmin” and “Usermin” from within the software are referencing their true ports that are known in the “Webmin” and “Usermin” settings on the “Webmin” side of the control panel.

Another option which is part of Virtualmin is the creation of “admin.domain.com” and “webmail.domain.com” which when you go to these addresses redirects to port “10000” and “20000” respectively meaning you don’t have to reference the ports directly when entering the URL in your browser.

thanks, I tried setting the suggested parameter. The problem persists. Everything else works jus fine.

Is there another setting that I can use to tell webmin/usermin which URL should they use?

Looking at the form action it points to save_user.cgi. Perhaps do you want to have a look?

webprefixnoredir=1 

Did you try https://sourceforge.net/p/webadmin/discussion/600155/thread/6eb89f60/?page=1&limit=25#8999

From post above, good catch from trocster:

There seems to be different resolutions from different people, not sure if you tried something specific or all of them.

Thanks, It is a good suggestion, but not exactly related to my problem. I think I failed to explain the problem properly. I will explain it again:

When I go to “virtual server > edit users > (user) > login to usermin”.
The redirection goes to localhost:20000
It is not redirecting to port 10000 (webmin). But to port 20000 (Usermin).

Webmin and virtualmin are working normally. Login is working normally behind the proxy. And actually usermin is also working normally behind a proxy (usermin.mydomain.com). This makes me think that is a bug.

How can I tell usermin that it is running behind a proxy? Or is this a bug isolated to the mentioned button (login to usermin) @trocster

Usermin is a separate service from Webmin. You have to configure both to operate behind a proxy. It is the same options as for Webmin just in the Usermin configuration instead.

it was a bug, it will be fixed in the next version, see:

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