httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Klavs Klavsen ...@vsen.dk>
Subject Re: [users@httpd] apache2 handles klavsen.info weirdly
Date Thu, 21 Aug 2003 08:41:14 GMT
On tor, 2003-08-21 at 07:30, Zac Stevens wrote:
[SNIP]
> I was under the impression that you can only have one ServerAlias directive
> per VirtualHost.  ie, the first ServerAlias is working and the rest are
> being ignored.  You can test this by rearranging the order of the
> ServerAlias lines in your existing config.
> 
Actually the other works just as well.

> Try listing the three aliases separated by spaces on a single ServerAlias
> line and see how it goes.
> 
I tried this:

ServerAlias vsen.dk klavsen.info www.klavsen.info 

I also tried to change it to:

ServerAlias klavsen.info vsen.dk www.klavsen.info 

and it doesn't make any difference (vsen.dk still works) :(

yet ServerAlias works fine for other shops - see f.ex. (which I changed
just now - to try the other setup)

<VirtualHost 192.168.1.2:80>
    ServerName hosting.enableit.dk
    ServerAlias www.hosting.enableit.dk webhotel.vsen.dk minebutik.dk
min-ebutik.dk www.minebutik.dk www.min-ebutik.dk www.virkpaanettet.dk
virkpaanettet.dk
    DocumentRoot /www/webhotel/html

    DirectoryIndex index.php

    RewriteEngine On
    # rewrite all to http://VirkPaaNettet.dk
    RewriteCond %{HTTP_HOST} !^VirkPaaNettet.dk$ [NC]
    RewriteRule ^/(.*)$     http://VirkPaaNettet.dk/$1 [R,L]

..
As you'll see - visiting www.min-ebutik.dk sends you to virkpaanettet.dk
- which it wouldn't if it hadn't went into this VirtualHost - so
ServerAlias seems to work just fine.
-- 
Regards,
Klavs Klavsen, GSEC - kl@vsen.dk - http://www.vsen.dk
PGP: 7E063C62/2873 188C 968E 600D D8F8  B8DA 3D3A 0B79 7E06 3C62
See my new CMS Hosting Service at http://www.VirkPaaNettet.dk

Working with Unix is like wrestling a worthy opponent. 
Working with windows is like attacking a small whining child 
who is carrying a .38.				

Mime
View raw message