Re: Apache replaces ip-address with (local) hostname
Ronald Capel <email@example.com> writes:
> I am having a problem with my Apache server at home. Everything is
> working fine when I access the webpages from the intranet. The
> problem occurs when trying to access the pages from the internet.
What's happening is that Apache automatically generates redirects in
some circumstances. One important case is where you specify a URL
without the trailing slash. Apache normally redirects this to:
So, the ServerName solution that nate mentioned---using the IP
address---should fix the problem. A nice alternative might be to
setting in "httpd.conf" to "off". Then, whenever Apache is generating
an absolute URL to refer back to itself (like for those redirects), it
will try to the use the hostname provided by the client (which will be
the IP address when you're connecting from the big, bag Internet)
instead of the ServerName.