0

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?

Luke Mlsna
  • 133
  • 4

1 Answers1

1

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.

Mattias Ahnberg
  • 4,139
  • 19
  • 19