I am following the threads to set up a virtual host on stackoverflow. i did follwoing
<VirtualHost *:80>
ServerAdmin timy@yt.com
DocumentRoot "C:/www/test"
ServerName test.devsite-1.com
ServerAlias test.devsite-1.com
</VirtualHost>
in windows host file
127.0.0.1 test.devsite-1.com
I hit following url in browser
The resulting page shows me the listing of folder i.e localhost page… where as I was expecting it will show the content of index.php placed in /test folder?
Can someone correct me if I am interpreting something wrong?
Regards
If you are being shown the contents of your test folder then maybe you need to define index.php as an index.
You could attempt with a index.html file inside the directory first, but i believe you are missing the DirectoryIndex directive in your Virtualhost configuration.
Try adding:
to your Virtualhost configuration.