httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@c2.org
Subject portnumber virtualhosts
Date Mon, 23 Sep 1996 22:34:20 GMT
	As people are aware, there is a bug where

ServerName www.c2.net
Port 80
Listen 80
Listen 8000

<VirtualHost www.c2.net:8000>

</VirtualHost>

	doesn't work, but 
[. . .]
<VirtualHost *:8000>

</VirtualHost>

	does work.

	I submit the following patch to fix this. Does this look
right? If it is the right patch, please commit it. Thanks.


*** 1.6 1996/09/16 03:53:25
--- http_main.c 1996/09/23 22:29:33
***************
*** 1095,1100 ****
--- 1095,1101 ----
  {
      struct hostent *h, *main;
      char *def_hostname;
+     server_rec *main_server = s;
      int n;
  
      /* Main host first */
***************
*** 1111,1117 ****
        /* Check to see if we might be a HTTP/1.1 virtual host - same IP */
        for (n = 0; main->h_addr_list[n] != NULL; n++) {
          if (s->host_addr.s_addr ==
!             (((struct in_addr *)(main->h_addr_list[n]))->s_addr))
            s->is_virtual = 2;
        }
  
--- 1112,1119 ----
        /* Check to see if we might be a HTTP/1.1 virtual host - same IP */
        for (n = 0; main->h_addr_list[n] != NULL; n++) {
          if (s->host_addr.s_addr ==
!             (((struct in_addr *)(main->h_addr_list[n]))->s_addr) &&
!             s->port == main_server->port)
            s->is_virtual = 2;
        }
  

-- 
Sameer Parekh					Voice:   510-986-8770
C2Net						FAX:     510-986-8777
The Internet Privacy Provider
http://www.c2.net/				sameer@c2.net

Mime
View raw message