Hi,
I have the following problem:
I have Apache on linux hosting several domains.
When I go the domain with http://www.domain2.com everything is OK.
But when i do http://domain2.com i get redirected to http://www.domain1.com,
domain1.com is my main domain.
The domains are all on 1 IP address and they are pointing to it, so I don't think it is a DNS problem.
Anyone get any idea?
multidomain domain2.com to www.domain1.com
Re: multidomain domain2.com to www.domain1.com
It might be a setting in your apache config for virtual hosts.
It should look something like this.
Make sure you have ServerAlias set.
To be sure, you should post you config.
or
Depending on which flavor of linux you have.
It should look something like this.
Code: Select all
<VirtualHost *:80>
ServerName www.domain1.com
ServerAlias domain1.com web.domain1.com
DocumentRoot /var/www/domain1.com
</VirtualHost>
To be sure, you should post you config.
Code: Select all
/etc/httpd/httpd.conf
Code: Select all
/etc/apache2/httpd.conf
and
/etc/apache2/sites-enabled/{virtualhost.conf}
Re: multidomain domain2.com to www.domain1.com
Thanks, that did the trick.
Any idea how I can direct all the sub domains to www?
Any idea how I can direct all the sub domains to www?