I've had VHosts working on my OSX client for quite some time. Recently, I've been trying to use http://localhost
to access the /Library/WebServer/Documents
but it keeps redirecting my to my blog. Can anyone point me in the direction where I might be going wrong?
Here is my hosts
file:
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
127.0.0.1 www.chrislrobinson.co.uk
127.0.0.1 blog.chrislrobinson.co.uk
And here is my httpd.conf
file:
...
ServerName localhost:80
DocumentRoot "/Library/WebServer/Documents"
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory "/Library/WebServer/Documents">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
And finally here is my httpd-vhosts.conf
<Directory /Library/WebServer/Documents>
Options Indexes FollowSymlinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory /Library/WebServer/Documents/blog>
Options Indexes FollowSymlinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory /Library/WebServer/Documents/chrislrobinson>
Options Indexes FollowSymlinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
NameVirtualHost *:80
<VirtualHost 127.0.0.1>
DocumentRoot "/Library/WebServer/Documents"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/Library/WebServer/Documents/blog"
ServerName blog.chrislrobinson.co.uk
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/Library/WebServer/Documents/chrislrobinson"
ServerName www.chrislrobinson.co.uk
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/Library/WebServer/Documents
ServerName www2.chrislrobinson.co.uk
</VirtualHost>