Hey all, I'm having trouble setting up VirtualHosts on an Apache server running on Mac OS X 10.5 Leopard. I followed this tutorial, and everything is working (except VirtualHost of course).
Okay, so here's the deal. If I run apachectl it says that there is no errors in the httpd.conf file. Here is the VirtualHost section of httpd.conf:
Here is the contents of /etc/hosts that contains the VirtualHost data:
And here is /etc/apache2/extra/httpd-vhosts.conf:
However when I visit bonnielynd.loca l, all it says is "Index of /" and it shows all of the files in the root server. Also, I have a file in the root folder of my server called "info.php", and I can type in bonnielynd.loca l/info.php" and it will display that page; so clearly it's displaying the files on /Library/WebServer/Documents instead of /Library/WebServer/Documents/bonnielynd.
And yes that folder DOES exist.
Can somebody help me fix this? I'm stumped.
P.S. I've installed Apache, PHP, and MySQL on Windows XP, and I never had such problems.
Okay, so here's the deal. If I run apachectl it says that there is no errors in the httpd.conf file. Here is the VirtualHost section of httpd.conf:
Code:
<VirtualHost *> DocumentRoot /Library/WebServer/Documents/bonnielynd ServerName bonnielynd.local </VirtualHost>
Code:
# My Sites 127.0.0.1 bonnielynd.local
Code:
<VirtualHost *>
DocumentRoot "/Library/WebServer/Documents"
ServerName localhost
</VirtualHost>
<VirtualHost *>
DocumentRoot /Library/WebServer/Documents/bonnielynd
ServerName bonnielynd.local
</VirtualHost>
And yes that folder DOES exist.
Can somebody help me fix this? I'm stumped.
P.S. I've installed Apache, PHP, and MySQL on Windows XP, and I never had such problems.
Comment