Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a linux server with 2 dedicated IPs that I use to host about 10 different sites with Apache's virtual host capabilities. Each site has its own domain name, and I use NameVirtualHosts to direct requests to the proper folder based on which domain is being requested, and anything that doesn't match (like entering one of the IP addresses) gets directed to a default page using <VirtualHost _default_:*>.

My question is, since I have multiple IPs and all possible requests are handled as virtual hosts, what should I set ServerName to in the httpd.conf file outside of the vhosts? Does it even matter?

share|improve this question

migrated from Jan 5 '12 at 2:51

This question came from our site for professional and enthusiast programmers.

If you leave it out entirely Apache will perform a gethostbyname() on the server where it starts and look it up that way, so it really doesn't matter much. Either leave it out entirely or set it to the name of the actual server.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.