You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Klavs Klavsen <kl...@vsen.dk> on 2003/08/21 07:24:08 UTC
[users@httpd] apache2 handles klavsen.info weirdly
Hi guys,
I have a virtualhost, which has this:
<VirtualHost 192.168.1.2:80>
ServerName www.vsen.dk
ServerAlias vsen.dk
ServerAlias klavsen.info
ServerAlias www.klavsen.info
.. the rest.
</VirtualHost>
If you visit http://vsen.dk or www.vsen.dk it works just fine.
But if you visit klavsen.info or www.klavsen.info I get the standard
"Welcome - it worked message - which is REALLY weird to me.
Anyone have any idea what is up here?
btw.it's apache-2.0.47 on Gentoo Linux.
--
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.
Re: [users@httpd] apache2 handles klavsen.info weirdly
Posted by Klavs Klavsen <kl...@vsen.dk>.
On tor, 2003-08-21 at 07:36, Jim Walls wrote:
[SNIP]
> Worked OK when I did it. Might you have been getting one of the other
> from cache?
>
Nope. I tried in Konqueror and Mozilla (used Galeon before) and
Konqueror shows the site it's suppose to - and Mozilla shows the "Seeing
this website instead of the page you expected?" page.
I decided to sniff (using ethereal), to see what the difference was (as
I suspect some language options to be the cause).
I found the reason. Mozilla (and Galeon) uses the IPv6 Address to go to
apache - and as my VirtualHosts all use my IPv4 address there's no
virtualhost that answers.
Konqueor uses IPv4 and thus gets what it's suppose to.
Any tips, on how I can set up my VirtualHosts so they answer on both
IPv4 and IPv6?
Currently I have:
NameVirtualHost 192.168.1.2:80
<VirtualHost 192.168.1.2:80> (my default vhost - for everything that is
not using a servername given in other virtual hosts)
</VirtualHost>
.. (same VirtualHost - just *.domains or www.domain.dk servernames)
which all works fine.
Thanks for your help.
--
Regards,
Klavs Klavsen, GSEC, klavs@EnableIT.dk, http://www.EnableIT.dk
Open Source Server, Security and Network Consulting
Phone: +45 3284 4372 Mobile: +45 2342 4372
PGP: 7E063C62/2873 188C 968E 600D D8F8 B8DA 3D3A 0B79 7E06 3C62
See our new CMS Hosting Service at http://www.VirkPaaNettet.dk
"Open Source Software - Sometimes you get more than you paid for."
--
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.
Re: [users@httpd] apache2 handles klavsen.info weirdly
Posted by Jim Walls <k6...@earthlink.net>.
Klavs Klavsen wrote:
> Hi guys,
>
> I have a virtualhost, which has this:
>
> <VirtualHost 192.168.1.2:80>
> ServerName www.vsen.dk
> ServerAlias vsen.dk
> ServerAlias klavsen.info
> ServerAlias www.klavsen.info
> .. the rest.
> </VirtualHost>
>
> If you visit http://vsen.dk or www.vsen.dk it works just fine.
> But if you visit klavsen.info or www.klavsen.info I get the standard
> "Welcome - it worked message - which is REALLY weird to me.
Worked OK when I did it. Might you have been getting one of the other
from cache?
-----------------------
Jim Walls - K6CCC
k6ccc@amsat.org
http://home.earthlink.net/~k6ccc/
626-302-8515 FAX 626-302-7501
AMSAT member 32537 / WSWSS member 395
To send me PGP encrypted E-Mail, use:
http://home.earthlink.net/~k6ccc/PublicKey.html
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] apache2 handles klavsen.info weirdly
Posted by Klavs Klavsen <kl...@vsen.dk>.
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.
Re: [users@httpd] apache2 handles klavsen.info weirdly
Posted by Zac Stevens <zt...@cryptocracy.com>.
On Thu, Aug 21, 2003 at 07:24:08AM +0200, Klavs Klavsen wrote:
> If you visit http://vsen.dk or www.vsen.dk it works just fine.
> But if you visit klavsen.info or www.klavsen.info I get the standard
> "Welcome - it worked message - which is REALLY weird to me.
>
> Anyone have any idea what is up here?
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.
Try listing the three aliases separated by spaces on a single ServerAlias
line and see how it goes.
Cheers,
Zac
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org