Introduced in 9.02 via newleft.cgi and now the default in 9.2 left.cgi, the method add_webprefix() totally breaks the Virtualmin administration interface with 404 errors when it is delivered via a reverse proxy.
I upgraded VM and the theme today and since then all Virtualmin links in left.cgi have duplicated the reverse proxy URL prefix, which breaks the links entirely. One example:
div class='leftlink' a href='/private/webmin/private/webmin/virtual-server/edit_domain.cgi?dom=119714900313433' target=right Edit Virtual Server /a /div
The reverse proxy's base URL is https://domain.tld/private/webmin/
This worked fine in 9.02 using left.cgi.
The unchanged settings in config are:
/etc/webmin/config:39:webprefixnoredir=1 /etc/webmin/config:40:webprefix=/private/webmin
The fix is attached.
Comments
Submitted by Iam-TJ on Fri, 09/18/2015 - 19:30 Comment #1
Submitted by JamieCameron on Sat, 09/19/2015 - 12:26 Comment #2
Thanks - I will include this fix in the next release.
Submitted by Issues on Sat, 10/03/2015 - 12:28 Comment #3
Automatically closed -- issue fixed for 2 weeks with no activity.
Submitted by Issues on Sat, 10/03/2015 - 12:28 Comment #4
Automatically closed -- issue fixed for 2 weeks with no activity.
Submitted by Iam-TJ on Thu, 10/08/2015 - 12:40 Comment #5
This needs re-examining! Today I discovered (not sure why this didn't show up previously) that with this fix in place although the VirtualMin links are correct the Webmin links are broken. For example the link from left.cgi to Servers > Postfix Mail Server which should be
div class='linkindented' a href='/private/webmin/postfix/' target=right Postfix Mail Server /a /div
becomes
div class='linkindented' a href='/postfix/' target=right Postfix Mail Server /a /div
Submitted by Iam-TJ on Thu, 10/08/2015 - 13:18 Comment #6
Revised patch:
Tested with webmin and virtualmin
Submitted by JamieCameron on Thu, 10/08/2015 - 16:46 Comment #7
The actual fix I submitted is different from the first patch on this bug.