Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm on OS X 10.6.8.

I had two virtual hosts set up on my machine, http://site1.local and http://site2.local.

Here's the Virtual Hosts file:

<VirtualHost *:80>
    DocumentRoot "/Users/myusername/Sites/site1"
    ServerName site1.local

<VirtualHost *:80>
    DocumentRoot "/Users/myusername/Sites/site2"
    ServerName site2.local

The hosts file points both site1.local and site2.local to It also points localhost to

Everything worked great until this morning, when I installed WordPress onto site1. I enabled mod_rewrite to get the nice URLs that WordPress makes.

Then I went to check on site2.local, and it started downloading the index page. It won't display the index page, which is index.php, and instead will insist on downloading it.

I also noticed that localhost and now go to different places, localhost going to my user Site root, and pointing to site1.local.

I've been troubleshooting for two hours now, am thoroughly confused and reaching the point of throwing my laptop against the wall.

Is there something really obvious that I'm missing?

Disabling mod_rewrite and FollowSymLinks did nothing.

Adding AddType application/x-httpd-php .php to the .htaccess of site2 did nothing either.


Output of httpd -S:

httpd: Could not reliably determine the server's fully qualified domain name, using n.local for ServerName
VirtualHost configuration: 
wildcard NameVirtualHosts and _default_ servers:
*:80 is a NameVirtualHost
  default server site1.local (/private/etc/apache2/extra/httpd-vhosts.conf:27)
  port 80 namevhost site1.local (/private/etc/apache2/extra/httpd-vhosts.conf:27)
  port 80 namevhost site2.local (/private/etc/apache2/extra/httpd-vhosts.conf:32)
  port 80 namevhost localhost (/private/etc/apache2/extra/httpd-vhosts.conf:37)
Syntax OK
share|improve this question
@kamera do you have NameVirtualHost *:80 uncommented? –  ThinkingMonkey Jan 27 '12 at 20:31
@ThinkingMonkey, yes, it’s uncommented. –  kamera Jan 27 '12 at 22:34
@kamera Did Wordpress install any .htaccess files? Or did you change any other config in any way to get it working, aside from enabling mod_rewrite? –  Shane Madden Jan 27 '12 at 23:46

Your Answer


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

Browse other questions tagged or ask your own question.