Mac OS X Leopard VirtualHost not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • helimeef
    New Member
    • Sep 2007
    • 77

    Mac OS X Leopard VirtualHost not working

    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:
    Code:
    <VirtualHost *>
      DocumentRoot /Library/WebServer/Documents/bonnielynd
      ServerName bonnielynd.local
    </VirtualHost>
    Here is the contents of /etc/hosts that contains the VirtualHost data:
    Code:
    # My Sites
    127.0.0.1 bonnielynd.local
    And here is /etc/apache2/extra/httpd-vhosts.conf:
    Code:
    <VirtualHost *>
      DocumentRoot "/Library/WebServer/Documents"
      ServerName localhost
    </VirtualHost>
     
    <VirtualHost *>
            DocumentRoot /Library/WebServer/Documents/bonnielynd
            ServerName bonnielynd.local
    </VirtualHost>
    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.
  • helimeef
    New Member
    • Sep 2007
    • 77

    #2
    Never mind I fixed it, and BOY am I happy, my client was getting angry -_-
    Anyways I needed to replace the asterisks (*) in the <VirtualHost> "tags" with 127.0.0.1 (I figured this out by firing up my PC and looking at httpd.conf).
    But thanks to whoever would have helped :)

    Comment

    Working...