Virtual Host showing "Index of /" instead of displaying my site
8,665
Find DirectoryIndex
in your apache config files (probably in the httpd.conf), and check whether index.php
is there. I assume that it is not.
Related videos on Youtube
Comments
-
coryjacik almost 2 years
So I just ran a clean install of Mountain Lion OSX 10.8 and am trying to get everything back up and running again. I uncommented the php module and vhosts in http.conf, added brew, mcrypt, autoconf etc.. I use VirtualHostX and I set my domain and local path but when I pull it up it shows Index of / instead of my app.
I have an index.php in my root and my vhosts looks like this:
NameVirtualHost *:80 <Directory "/Users/me/Sites/mysite.com/public/"> Allow From All AllowOverride All Options +Indexes </Directory> <VirtualHost *:80> ServerName "mysite.dev" DocumentRoot "/Users/me/Sites/mysite.com/public" </VirtualHost>
I've spend hours troubleshooting issues like these in the past...getting better, but this is a new one and I can't seem to track down the issue.
- I'm using a php framework called Laravel and the doc root must be directed to public directory.
-
Mistry over 11 yearsSomething stupid, do you need a trailing slash at the end of you virtual host like you do in directory
-
nerdess over 9 yearsthx, worked for me :)