httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe Jr." <wr...@apache.org>
Subject Fwd: svn commit: r1057050 - /httpd/httpd/trunk/modules/generators/mod_status.c
Date Mon, 10 Jan 2011 04:05:25 GMT
Author: sf
Date: Sun Jan  9 23:07:52 2011
New Revision: 1057050

URL: http://svn.apache.org/viewvc?rev=1057050&view=rev
Log:
Display the local IP address in server-status. This can be useful for HTTPDs
behind load balancers.

Modified:
    httpd/httpd/trunk/modules/generators/mod_status.c

Modified: httpd/httpd/trunk/modules/generators/mod_status.c
URL:
http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_status.c?rev=1057050&r1=1057049&r2=1057050&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_status.c (original)
+++ httpd/httpd/trunk/modules/generators/mod_status.c Sun Jan  9 23:07:52 2011
@@ -376,7 +376,8 @@ static int status_handler(request_rec *r
                  "<html><head>\n<title>Apache Status</title>\n</head><body>\n",
                  r);
         ap_rputs("<h1>Apache Server Status for ", r);
-        ap_rvputs(r, ap_get_server_name(r), "</h1>\n\n", NULL);
+        ap_rvputs(r, ap_get_server_name(r), " (", r->connection->local_ip,
+                  ")</h1>\n\n", NULL);

As it can be multi-homed, what about spelling out " (via n.n.n.n)" with the
explicit hint that this isn't the exclusive address of the server?  In fact
this request is routed to different listeners, so "big.site.com (127.0.0.1)"
wouldn't make any sense, but "big.site.com (via 127.0.0.1)" offers the fairly
simple explanation that they connected via loopback.

Mime
View raw message