Super User is a question and answer site for computer enthusiasts and power users. 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 want to set up my server for multiple sites but I want a good error message if people try to access them by the IP, is there any way to set this up in httpd.conf? I know you have to use virtualhosts but everything wants a servername and everywhere I've seen that's been set to a domain, is there any way to set servername to an IP to serve alternate content?

share|improve this question
up vote 1 down vote accepted

As it goes in Apache docs, the first defined virtual host becomes primary and serves the requests that doesn't match any other virtualhost's ServerName (also, there are many useful examples of different configurations)

share|improve this answer
Yeah, my bad... I didn't have an index.html page in there and kept seeing the default "you have a server!" page... – JKirchartz Jun 10 '11 at 12:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .