Help redirecting https://hostname/icingaweb2 to https://dnsname.company.com/icingaweb2 automatically

More of an Apache question but …

Any ideas how could I modify icingaweb2.conf in /etc/apache2/conf-available so that requests using the server name would be redirected and use the DNS name instead?

There is a good chapter in the Apache docs, on how to redirect requests to a canonical host name:

https://httpd.apache.org/docs/2.4/en/rewrite/remapping.html#canonicalhost

I recommend to RewriteRules, and you can of cource limit this to /icingaweb2

2 Likes