Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Actually, you want 'UseCanonicalName'' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Actually, you want 'UseCanonicalName'
Authored by: mithras on Nov 11, '02 07:53:26AM

Your solution works, but is suboptimal. When you change the ServerName, anytime you try to access your site from within your home LAN, you'll be redirected to use the external hostname.

Instead of changing the ServerName, search for the line containing the word 'UseCanonicalName'. As explained in httpd.conf, this controls whether the webserver uses the ServerName to construct URLs for redirects or rewrites. For no good reason, that is set to 'On' by default.

Set UseCanonicalName to 'Off', and relative URLs or directory rewrites will use whatever hostname you accessed the site with. That way you can access it via the LAN or via the Internet.

Hope that makes some sense.



[ Reply to This | # ]
Actually, you want 'UseCanonicalName'
Authored by: Anonymous on Nov 11, '02 09:16:33AM

Yes, this is one of my standard modifications every time I do an OS X install.

Really though, in a consumer OS, UseCanonicalName should be set to Off by default.



[ Reply to This | # ]
Actually, you want 'UseCanonicalName'
Authored by: jchi on Nov 11, '02 01:03:09PM

That is a better solution. Thanks!



[ Reply to This | # ]