Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Multiple Domains - Apache
- Date: Tue, 29 Apr 2008 10:25:25 +0900
- From: dave@example.com
- Subject: Re: [tlug] Multiple Domains - Apache
- References: <5d4da3b88ceb2ef7d5735c55eed18ba9@localhost.localdomain>
- User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)
Deepan <codeshepherd@example.com> writes: > I am serving two domains from the same machine > using Apache. I want www to be used in both of the > domains, hence I redirect urls without www to > appropriate urls with www. I have the following > configuration in httpd.conf to achieve this. > > <VirtualHost *:80> > DocumentRoot /var/www/html/domaina/ > ServerName www.domaina.com > ... > </VirtualHost> > > <VirtualHost *:80> > DocumentRoot /var/www/html/domainb/ > ServerName www.domainb.com > ... > </VirtualHost> > > However all requests to http://domainb.com/ gets > redirected to http://www.domaina.com whereas the > expected behaviour is to get redirected to > http://www.domainb.com/ . If the requested address is http://domaina.com, then neither of the vhosts shown are going to apply. Presumably it's defaulting to www.domainb.com when no vhosts match the request. You could try adding something like this so that the vhost responds to requests for http://domaina.com, allowing it to do the redirect: ServerAlias domaina.com or Serveralias *.domaina.com //Dave
- References:
- [tlug] Multiple Domains - Apache
- From: Deepan
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Multiple Domains - Apache
- Next by Date: Re: [tlug] "VDSL" modem thingy? Linux and internet password?
- Previous by thread: Re: [tlug] Multiple Domains - Apache
- Next by thread: Re: [tlug] Multiple Domains - Apache
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links