Apache Virtual Host weirdness...

Apache Virtual Host weirdness...

Post by Steven Clar » Mon, 23 Aug 1999 04:00:00



Hello everyone,

While testing Apache's name virtual host feature I ran across a weird
behavior that I don't quite understand. I am using Apache 1.3.3, and
have configured several domains under it, the domains are all running
perfectly fine, everything seemed right. I was doing testing what would
happen when a browser which isn't compatible with http 1.1 would get
when requesting stuff off this server. Since I don't have a browser
which wasn't compatible to HTTP 1.1 I was requesting through telnet.
Here comes the odd part. If I telnet to the http port from a different
computer to the server and request a document using "GET /" I get the
response that I configured under apache basically getting a web page
saying that you can't view such and such site since you haven't
requested through HTTP 1.1. When I telneted from the the server itself,
telnet localhost 80, and send the same request "GET /" I get a directory
listing sent to me?

Now can anyone explain why I don't get the same response from both
locations?

Thanks
Steven Clark

 
 
 

Apache Virtual Host weirdness...

Post by Joshua Sliv » Tue, 24 Aug 1999 04:00:00



> Hello everyone,
> While testing Apache's name virtual host feature I ran across a weird
> behavior that I don't quite understand. I am using Apache 1.3.3, and
> have configured several domains under it, the domains are all running
> perfectly fine, everything seemed right. I was doing testing what would
> happen when a browser which isn't compatible with http 1.1 would get
> when requesting stuff off this server. Since I don't have a browser
> which wasn't compatible to HTTP 1.1 I was requesting through telnet.
> Here comes the odd part. If I telnet to the http port from a different
> computer to the server and request a document using "GET /" I get the
> response that I configured under apache basically getting a web page
> saying that you can't view such and such site since you haven't
> requested through HTTP 1.1. When I telneted from the the server itself,
> telnet localhost 80, and send the same request "GET /" I get a directory
> listing sent to me?
> Now can anyone explain why I don't get the same response from both
> locations?

Just a guess: localhost=127.0.0.1 which is probably not the IP address
that your virtual hosts are listening on.

By the way, "GET /" is an HTTP/0.9 request.  You probably want to at least
do "GET / HTTP/1.0", since no modern clients speak HTTP/0.9.

--
Joshua Slive

http://finance.commerce.ubc.ca/~slive/

 
 
 

1. Apache 1.3b2: Default Host and all virtual hosts serve only first virtual hosts pages?

Hello.

Have been running 1.2b8 for a intranet and decided to move upto 1.3b2. I
have several name based virtual hosts that have been working under
1.2b8. After compiling and installing 1.3b2 my virtual hosts do not
work. In fact what happens is that even though DocumentRoot and default
server name is different, eg: www.serverA.net pointing to /www/default,
Apache 1.3b2 will always take me to the first defined virtual host as if
it's locked to it no matter what virtual host I try to browse. What
gives? Please post and E-Mail.

In /etc/hosts for my machines IP address I have

A.B.C.D         www.default.net www.virtA.net www.virtB.net

In ../conf/httpd.conf I have;

<VirtualHost www.virtA.net>

DocumentRoot /usr/local/www/virtA
ServerName www.virtA.net
ErrorLog logs/virtA.error.log
TransferLog logs/virtA.access.log
</VirtualHost>

<VirtualHost www.virtB.net>

DocumentRoot /usr/local/www/virtB
ServerName www.virtB.net
ErrorLog logs/virtB.error.log
TransferLog logs/virtB.access.log
</VirtualHost>

--

2. ATI Rage128 and Linux

3. Apache 1.2.0 -- Virtual Host Weirdness

4. HP DeskJet 690C doesn′t print the whole do cument

5. Mixing Apache Name Based Virtual Hosts and SSL Virtual Host

6. Printing on Legal size paper

7. Apache - Virtual Host or /etc/hosts

8. www servers under Linux

9. Apache 2.0.x virtual host ALWAYS beings up the FIRST host in the list..

10. virtual hosting weirdness

11. FrontPage virtual hosting, removal or reset of virtual host

12. : How to prevent one named virtual host from "seeing" another virtual hosts files ?

13. For Discussion: web virtual hosting vs mail virtual hosting