>> > I do have a fully qualified domain name (FQDN) and a corresponding IP address,
>> > so I do not need any other domain name services. What I want though, is that
>> > when users type http://localhost/ into their web browser, from the host
>> > computer, the URL changes in the web browser's URL text label to either the FQDN
>> > or the actual IP, automatically. Why coulnd't Apache do this? I am thinking that
>> > it could be done with URL redirection? How???
>> if you've a correct ServerName entry on each developer machine in
>> httpd.conf you might try UseCanonicalNames On which should make apache
>> send a redirect to the http://ServerName/path for each request to
> Thank you for your response. However setting the UseCanonicalName to On and
> then using a ServerName directive to specify the host and port to display
> in the browser's URL text field is not such a good idea because the FQDN
> of my computer changes every now and then, together with its IP. But
> I wonder why Apache can't figure the FQDN out without having to
> specify if in the ServerName directive. After all tools like
> ipconfig and nskookup can do this. The FQDN could be
> obtained when apache is started and cached, couldn't
The UseCanonicalName On would not solve the problem because that would
only work if something (relative redirect from script or incomplete URL)
triggered a redirection. And now you tell us your FQDN hostname changes
too. How would you expect anyone from the internet to reliably access
Apache does not check your FQDN, because in most cases it does not even
care which interface a request comes in on, unless you configure it to
bind to specific IP(s) and/or port(s), or virtual host.
If you want this to work, maybe you should consider getting a fixed FQDN
from a dynamic DNS service (I use free no-ip.com names). Then if you run
their client to keep the DNS up to date, a fixed name will always point to
your dynamic public IP. And if you cannot figure out how to redirect, you
could put a shortcut to that name in your browser.
Otherwise, you are going to have to do some scripting to modify apache's
config and restart it.
David Efflandt - All spam ignored http://www.de-srv.com/