Specifying a Server Name


ServerName www.example.com


Sometimes Apache needs to construct self-referential URLs. That is, it needs to construct a URL that refers to the server itself. For example, it may need to redirect a request to a different page or print the website address at the end of a generated error page. By default, this is done using the domain specified with the ServerName directive. Please see Chapter 2 for details on how to use UseCanonicalName and Port to control this behavior.

If no server name is present, Apache will try to infer a valid server name by performing a reverse DNS lookup on the server's IP address. If the DNS server is not properly set up, this can take a long time and the requester may have to wait through a rather long pause.




Apache(c) Phrase Book(c) Essential Code and Commands
Apache Phrasebook
ISBN: 0672328364
EAN: 2147483647
Year: 2006
Pages: 254

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net