httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@ibm.net>
Subject confused about new ServerName logic
Date Wed, 21 Jun 2000 12:44:25 GMT
I thought I understood what was going on, but I guess not...  I'm
getting messages about needing ServerName even when gethostname() and
gethostbyname() work.  (Also, I'm not crazy about the phrasing of the
messages, but probably nobody will like my changes :) )

Can somebody explain why the patch below isn't appropriate?  It only 
complains about no ServerName if we can't properly determine the
hostname.  It doesn't complain if we *can* determine the hostname.

Thanks!

Index: src/main/util.c
===================================================================
RCS file: /cvs/apache/apache-2.0/src/main/util.c,v
retrieving revision 1.58
diff -u -r1.58 util.c
--- util.c	2000/06/20 19:30:32	1.58
+++ util.c	2000/06/21 12:41:41
@@ -1905,15 +1905,16 @@
         }
     }
 
-    if (!server_hostname) 
+    if (!server_hostname) {
         server_hostname = ap_pstrdup(a, "127.0.0.1");
 
-    ap_log_error(APLOG_MARK, APLOG_ALERT | APLOG_NOERRNO, 0,
-                 NULL, "%s: Missing ServerName directive in httpd.conf.",
-                 ap_server_argv0);
-    ap_log_error(APLOG_MARK, APLOG_ALERT | APLOG_NOERRNO, 0,
-                 NULL, "%s: assumed ServerName of %s",
-                 ap_server_argv0, server_hostname);
+        ap_log_error(APLOG_MARK, APLOG_ALERT | APLOG_NOERRNO, 0,
+                     NULL, "%s: A ServerName directive is missing from httpd.conf.",
+                     ap_server_argv0);
+        ap_log_error(APLOG_MARK, APLOG_ALERT | APLOG_NOERRNO, 0,
+                     NULL, "%s: ServerName has been set to %s.",
+                     ap_server_argv0, server_hostname);
+    }
              
     return server_hostname;
 }


-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Mime
View raw message