httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <r...@imdb.com>
Subject Re: Thud
Date Mon, 25 Nov 1996 21:45:02 GMT
Ben Laurie wrote:
>
>I unleashed my Webmaster on the latest snapshot. He loved "Configure; make",
>but was less pleased when adding a virtual host - this caused the main host to
>stop serving. Analysis shows the cause to be s->server_hostname being NULL.
>This, in turn, was caused by a lack of DNS for the virtual host. A quick fix
>is:

+1 on this or a variation on it for 1.2b1

>Index: http_main.c
>===================================================================
>RCS file: /export/home/cvs/apache/src/http_main.c,v
>retrieving revision 1.89
>diff -c -r1.89 http_main.c
>*** http_main.c 1996/11/22 03:17:07     1.89
>--- http_main.c 1996/11/25 20:33:49
>***************
>*** 1323,1328 ****
>--- 1323,1333 ----
>                                   sizeof (struct in_addr), AF_INET);
>                if (h != NULL)
>                    s->server_hostname = pstrdup (pconf, (char *)h->h_name);
>+               else
>+                   {
>+                   fprintf(stderr,"Failed to resolve server name (check DNS)\n");
>+                   exit(0);
>+                   }
>            }
>        }
>      }


Mime
View raw message