Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can !
Moderator: General Moderators
visionmaster
Forum Contributor
Posts: 139 Joined: Wed Jul 14, 2004 4:06 am
Post
by visionmaster » Tue Oct 05, 2004 4:02 pm
Hello,
I have several domains on one webserver that have to be configured by httpd.conf
httpd.conf:
------------
Code: Select all
ї...]
NameVirtualHost xxx.xxx.xx.xx
<VirtualHost xxx.xxx.xx.xx>
ServerName www.domain1.de
DocumentRoot /www/www.domain1.de/site
</VirtualHost>
<VirtualHost xxx.xxx.xx.xx>
ServerName domain1.de
DocumentRoot /www/www.domain1.de/site
</VirtualHost>
<VirtualHost xxx.xxx.xx.xx>
ServerName domain2.de
DocumentRoot /www/www.domain2.de/site
</VirtualHost>
ї...]
OR
<VirtualHost xxx.xxx.xx.xx>
ServerName domain1.de
ServerAlias www.domain1.de
DocumentRoot /www/www.domain1.de/site
</VirtualHost>
<VirtualHost xxx.xxx.xx.xx>
ServerName domain2.de
DocumentRoot /www/www.domain2.de/site
</VirtualHost>
==> Entering domain1.de in my browser opens up the content of
http://www.domain2.de (I restarted httpd). Entering
http://www.domain1.de , then the content of
http://www.domain1.de is indeed shown. That is correct.
What am I doing wrong? How can I configure httpd.conf that also urls without the www are redirected correctly?
Thanks!
Last edited by
visionmaster on Wed Oct 06, 2004 3:55 am, edited 1 time in total.
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Tue Oct 05, 2004 4:05 pm
come on now.. you've been here long enough to know better when posting stuff like this..
put some
twigletmac
Her Royal Site Adminness
Posts: 5371 Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK
Post
by twigletmac » Wed Oct 06, 2004 2:51 am
visionmaster
Forum Contributor
Posts: 139 Joined: Wed Jul 14, 2004 4:06 am
Post
by visionmaster » Wed Oct 06, 2004 3:59 am
Hello,
feyd, sorry for forgetting the
Code: Select all
tags...
[quote="twigletmac"]
http://httpd.apache.org/docs/mod/core.html#serveralias
[/quote]
Hmm, look at my last two containers, I added ServerAlias. Am I understanding something completely wrong?
Thanks!
twigletmac
Her Royal Site Adminness
Posts: 5371 Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK
Post
by twigletmac » Wed Oct 06, 2004 2:49 pm
Have a look at how the various directives are being used and what they should be used for - I think that you may need to rejig your virtual host declarations.
Mac