2

I am trying to setup vhosts in WAMPSERVER and I am running into an issue where all sites are pointing to the first vhosts and not delegating properly. Has anyone had this issue?

Here is my setup.

In windows hosts file:

127.0.0.1 siteabc.local
127.0.0.1 sitexyz.local

In httpd-vhosts.conf:

<VirtualHost 127.0.0.1>
    DocumentRoot "C:\Users\Rick\Documents\Projects\siteabc"
    ServerName siteabc.local
    ErrorLog "logs/siteabc-error.log"
    CustomLog "logs/siteabc-access.log" common
    <Directory "C:\Users\Rick\Documents\Projects\siteabc">
        Options Indexes FollowSymLinks
        AllowOverride all
        Order Deny,Allow
        Allow from all
    </Directory>
</VirtualHost>

<VirtualHost 127.0.0.1>
    DocumentRoot "C:\Users\Rick\Documents\Projects\sitexyz"
    ServerName sitexyz.local
    ErrorLog "logs/sitexyz-error.log"
    CustomLog "logs/sitexyz-access.log" common
    <Directory "C:\Users\Rick\Documents\Projects\sitexyz">
        Options Indexes FollowSymLinks
        AllowOverride all
        Order Deny,Allow
        Allow from all
    </Directory>
</VirtualHost>

<VirtualHost 127.0.0.1>
    DocumentRoot "C:\Users\Rick\Documents\Projects"
    ServerName localhost
    ErrorLog "logs/localhost-error.log"
    CustomLog "logs/localhost-access.log" common
    <Directory "C:\Users\Rick\Documents\Projects">
        Options Indexes FollowSymLinks
        AllowOverride all
        Order Deny,Allow
        Allow from all
    </Directory>
</VirtualHost>

Ok so from this setup going to siteabc works...but going to sitexyz, it still goes to siteabc. Not sure what I did wrong here.

Thanks for looking.

1 Answer 1

0

Ok it turns out I needed to add another set for www. So one set ov virtualhost without WWW and one with...

You must log in to answer this question.