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
    ServerAdmin webmaster@localhost
   ...stuff here


    ServerAdmin webmaster@localhost
    ...stuff here

This doesn't seem to work.

Before, it was <VirtualHost *:80> and it worked.

share|improve this question

migrated from Oct 20 '10 at 8:10

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

it should have

NameVirtualHost domains.local:80

this is a full working example

NameVirtualHost domains.local:80
<VirtualHost domains.local:80>
   DocumentRoot "C:/****/public"
   ServerName domains.local
   # This should be omitted in the production environment
   SetEnv APPLICATION_ENV development
   <Directory "C:/*****/public">
       Options Indexes MultiViews FollowSymLinks
       AllowOverride All
       Order allow,deny
       Allow from all
share|improve this answer

Use <VirtualHost *:80> for each of your vhost directives. Then specify the ServerName for each vhost directive.

If you do that then you don't need to set up NameVirtualHost for each vhost, although that will work too. I'd be interested to see if anyone has any info on why one method is better than the other.

You can also use ServerAlias if you want to give an alternative hostname for the same vhost.

See for more.

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.