You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rob Hartill <ro...@imdb.com> on 1996/10/04 11:35:39 UTC
WWW Form Bug Report: "Can't run virtual hosts on same IP addr as main server" on BSDI (fwd)
Not acked
----- Forwarded message from chris@yacc.co.uk -----
Message-Id: <19...@taz.hyperreal.com>
From: chris@yacc.co.uk
To: apache-bugs%apache.org@organic.com
Date: Fri Oct 4 2:15:46 1996
Subject: WWW Form Bug Report: "Can't run virtual hosts on same IP addr as main server" on BSDI
Submitter: chris@yacc.co.uk
Operating system: BSDI, version: 2.x
Version of Apache Used: 1.1.1
Extra Modules used: status and info
URL exhibiting problem:
Symptoms:
--
I want a main server on 193.117.220.72 port 80
with several virtual servers, some of which are
to run on that same IP address but using different
ports (8000+). It appears I can't do this - the
main server is invoked for any port on that
primary IP address. (VServers do work correctly
on aliases IP addresses.)
I had a dig around the code, and my suggestion is
to amend a single condition test in http_main.c.
Here's a unidiff for you -
--- - Thu Jan 1 01:00:00 1970
+++ http_main.c Thu Oct 3 15:26:52 1996
@@ -1041,7 +1041,7 @@
server_rec *virt;
for (virt = server->next; virt; virt = virt->next)
- if ((virt->is_virtual == 1) && /* VirtualHost */
+ if ((virt->is_virtual) && /* VirtualHost */
(virt->host_addr.s_addr == htonl(INADDR_ANY) ||
virt->host_addr.s_addr == server_ip.s_addr) &&
(virt->host_port == 0 || virt->host_port == port))
What will this break that I've not noticed? Possibly
implementations using the "Host:" header in HTTP version
1.1, which I can't test reliably here.
Regards,
Chris
--
Backtrace:
--
--
----- End of forwarded message from chris@yacc.co.uk -----
--
Rob Hartill (robh@imdb.com)
http://www.imdb.com/ ... why wait for a clear night to see the stars?.