Trying to setup apache virtual host on my macbook pro for development.
Want to setup site so i can use the following url format.
This resolves to apache's default index.html.en, the one which say's "It works!"
However, when I use http://localhost/example, seems to load example's index file.
This is my setup
copy of my /etc/hosts file
127.0.0.1 localhost 127.0.0.1 example.local 255.255.255.255 broadcasthost #::1 localhost #fe60::1%lo0 localhost
copy of /etc/apache2/extra/httpd-vhosts.conf file
NameVirtualHost *:80 <VirtualHost *:80> ServerName example.local ServerAlias example.local DocumentRoot /Library/WebServer/Documents/example #DirectoryIndex index.php <Directory /Library/WebServer/Documents/example/> Order Allow,Deny Allow from All Options Indexes FollowSymLinks </Directory> </VirtualHost>
I have remove other vhost from the file to eliminate vhost clashing.