-1

I am having trouble getting a second site to resolve. Unfortunately neither site is resolving now. Here is where I'm at.

In my httpd.conf

   DocumentRoot "c:/wamp/www/"

NameVirtualHost *:80


<VirtualHost *>
    ServerName site1.com
    DocumentRoot /www/site1
    <Directory "/www/site1">
        Options FollowSymLinks
        AllowOverride All

        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

<VirtualHost *>
    ServerName site2.com
    DocumentRoot /www/site2
    <Directory "/www/site2">
        Options FollowSymLinks
        AllowOverride All

        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost

In my root .htaccess i have something like this

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.site2\.com$
RewriteCond %{REQUEST_URI} !^/www/site2/
RewriteRule (.*) /www/site2/$1

RewriteCond %{HTTP_HOST} ^www\.site1\.com$
RewriteCond %{REQUEST_URI} !^/www/site1/
RewriteRule (.*) /www/site1/$1

In each site directories .htaccess I have this

RewriteEngine On
RewriteOptions Inherit

Where am I going wrong? Also does the "live_site": declaration in configuration.php affect this?

>

Seth
  • 121
  • 2
  • 8
  • Right there are a few issues with the Virtual Hosts you have setup. Its probably easier to [try reading through this answer to see how to setup Virtual Hosts properly.](http://stackoverflow.com/questions/23665064/project-links-do-not-work-on-wamp-server/23990618#23990618) The .htaccess file should then become unnecessary and can be removed. – RiggsFolly Oct 17 '14 at 10:52
  • I was actually getting ready to update this. I have since removed htaccess, and read about 20 tutorials on virtual hosts. I've declared both sites properly and both domain names go to the original site I had setup at this point – Seth Oct 17 '14 at 10:53

1 Answers1

0

The short answer for my posting is by moving the [VirtualHosts] declarations to httpd-hosts.conf instead of httpd.conf .htaccess is no enabled.

Seth
  • 121
  • 2
  • 8