Search code examples
apacheosx-mountain-lionvirtualhost

Apache Virtual Host showing its works but not loading the correct index


I am using this configuration and my .dev is working fine but its displaying it works instead of whats in the index.php is there a default index.php?

MACOSX

<Virtualhost *:80>
    VirtualDocumentRoot "/Users/Jess/Sites/dev/%1/"
    ServerName vhosts.dev
    ServerAlias *.dev
    UseCanonicalName Off
    LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
    ErrorLog "/Users/Jess/Sites/dev/vhosts-error_log"

    <Directory "/Users/Jess/Sites/dev/*">
    Options -Indexes FollowSymLinks
    AllowOverride AuthConfig FileInfo
    Order allow,deny
    Allow from all
    </Directory>
</Virtualhost>

Solution

  • I believe the default file is /Library/WebServer/Documents/index.html. Make sure your configuration file is added at the end of /etc/apache2/httpd.conf. Something like this:

    Include /etc/apache2/users/XXXXX.conf