I don't use the default file structure for my websites; instead of storing them in the XAMPP folder, I store them in a root directory called "www".
I've edited my httpd.conf as well as the httpd-vhosts.conf files. To the best of my knowledge, they're set up in parallel to how I did them on Windows. I also edited the Mac hosts file to point all my virtual servers at 127.0.0.1, as usual. But something's wrong.
When I type the name of one of my virtual servers into a browser, I don't get the index page; instead, I get a directory listing of the whole "www" folder. For example, I have a virtual server called "speakout". But instead of the speakout site's home page, the browser gives me the "Index of /" list with all twelve or so of my site directories listed -- including speakout.
When I click on THAT link, I do get the index page -- but of course, it's all wrong, with the url being "http://speakout/speakout/index.php" instead of "http://speakout/index.php".
Perhaps my problem is something to do with the way Mac handles directory structures. Here is are the lines for speakout in my httpd-vhosts.conf file:
- Code: Select all
NameVirtualHost speakout:80
. . .
<VirtualHost speakout:80>
. . .
DocumentRoot /www/speakout
. . .
</VirtualHost>
And here are the lines from my httpd.conf file:
- Code: Select all
DocumentRoot "/www"
. . .
<Directory "/www">
. . .
</Directory>
I'm really baffled by the problem. Any insights?