Using NGINX as reverse proxy to webmin on a remote server
Francis Daly
francis at daoine.org
Sat Apr 25 17:45:12 UTC 2020
On Fri, Apr 24, 2020 at 09:01:36AM +0000, Carsten Laun-De Lellis wrote:
Hi there,
> The webin servers are setup according the following scheme:
>
> WebminX runs on https://hostX.local.domain:10000.
>
> My goal is to setup a central Nginx server and reverse proxy to the different webmin servers.
> location /host1 {
> proxy_pass https://host1.local.domain:10000/;
For this, you probably want "location /host1/" (with the trailing /).
> Unfortunately this is not working. I have checked the internet but found only how-tos where Nginx and webmin server running on the same host. Also these how-tos don't work for me.
>
What does "not working" mean here?
You make one specific request; you want to get one specific response;
but you get a different response instead?
I suspect that things will be simpler if you are happy to reconfigure
all of the "webmin" instances so that they believe they are installed
at the same place in the url hierarchy as the external users see. That is:
* add the line webprefix=/host1 to /etc/webmin/config on host1
* add the line webprefix=/host2 to /etc/webmin/config on host2
and then change your config to only use one trailing slash like so:
location /host1/ {
proxy_pass https://host1.local.domain:10000;
And if there is still a problem, if you can show the request/response that
does not do what you expect, it may be simpler for others to understand
and help.
Cheers,
f
--
Francis Daly francis at daoine.org
More information about the nginx
mailing list