mailman management interface sets a bunch of th URLs to localhost:10000

when accessing it through a local proxy via apache. It is rewriting the urls in a way that makes assumptions that do not work when accessing virtualmin from an apache proxy.

Status: 
Active

Comments

Which URL are you trying to access that is being re-written as localhost:10000 ? I have an ideas as to what could be causing this, but need more details about what you are trying to access and where it redirects to in order to be sure..

I had the same problem when I created the following with clientdomain = localhost

replacing clientdomain with the real client domain causes this to work.

SSLProxyEngine on

RewriteRule /mailman/listinfo(/.*) "https://{clientdomain}:10000/virtualmin-mailman/unauthenticated/listinfo.cgi$1" [P]

RewriteRule /mailman/([^/])(.) "https://{clientdomain}:10000/virtualmin-mailman/unauthenticated/$1.cgi$2" [P]

RewriteRule /virtualmin-mailman/unauthenticated/(.*) "https://{clientdomain}:10000/virtualmin-mailman/unauthenticated/$1" [P]

RewriteRule /cgi-bin/mailman/([^/])(.) "https://{clientdomain}:10000/virtualmin-mailman/unauthenticated/$1.cgi$2" [P]

The cause is the top of /usr/share/webmin/virtualmin-mailman/.cgi and /usr/share/webmin/virtualmin-mailman/unauthenticated/.cgi - it gets the current host from HTTP_HOST which is what the proxy command sets.

A improvement would be if it tried ENV{'HTTP_X_FORWARDED_FOR'} before ENV{'HTTP_HOST'} on all cgi bits but this will only give a hostname and not a scheme or path.

I ended up having to use /etc/webmin/virtualmin-mailman/config rewrite_url set to http://{clientdomain} which means I can only have one mailman client on this server. Is it possible to set this per client? Its far from perfect however the goal was to remove :10000 urls.