I have Webmin working on a domain with an SSL certificate. However, when I visit it over HTTP, it redirects to https://hostname:10000
instead of the domain name.
I've set the FQDN in /etc/hosts
(because I can't find any other way to do it - can't find anything on this mysterious "systemd-resolved" to edit my resolv.conf file, and all the online guides say "use resolvconf
" which I don't even have) like so:
127.0.1.1 hostname.example.com hostname
(it was 127.0.1.1
before, not 127.0.0.1
)
hostname
returns my hostname, hostname --domain
returns my domain, and hostname -f
returns the FQDN that I have set.
But Webmin doesn't care. Webmin wants to be special. Webmin decides to assume that my hostname is my domain name, and redirect to that instead. How do I fix this?
Some sites say I should edit the Webmin source code, but that would get reverted as soon as I update, and is also kind of not the best solution in general.