Apache in OS X not displaying localhost nor vhosts correctly

Posted by Marcus on Server Fault See other posts from Server Fault or by Marcus
Published on 2013-10-30T09:19:37Z Indexed on 2013/10/30 9:56 UTC
Read the original article Hit count: 298

Filed under:
|

I've encountered a really odd problem in my development environment, and I really can't make any sense of it.

It started by a locally developed PHP-site refused to update any content I edited in a file – no text or nothing.

So if the document was: <h2>Hello!</h2> and I edited it to <h2>What's wrong?!</h2> it still outputed <h2>Hello!</h2>. I thought is was some kind of cache:ing problem, but no "hard reloads" in the browser nor sudo apachectl -k restart sorted it out. Only a restart of my Mac did finally fix it.

Now, a few days later even stranger issues are appearing. I have a LAMP-stack installed via Homebrew, in httpd-vhosts.conf I've set ~/Dev/ as my localhost, and I set up a <VirtualHost *80> for each project ("ServerName projectname.dev" for example).

However, what ever files of folder I put in ~/Dev/ have stopped showing up on localhost, and new VirtualHost-directives doesn't work.

Three projects + "docs" in the folder: Folder

But "localhost" only displays the two older projects...?
Localhost

So, as I've said – I've tried restarting Apache (without errors), clearing browser caches (tried in three browsers, Chrome, Safari and Firefox) and ever rebooting the Mac. Nothing. Any ideas?

Running OS X 10.8.5 and Apache 2.2.24.

© Server Fault or respective owner

Related posts about apache2

Related posts about macosx