server-status

I'm trying to set up server-status on my production server so I get a
better feel for what's going on - I'll then plug it in to a version of
rrd, probably munin - when it's all working.

Prod servers use loads of virtual hosting, rewriting, etc, and wanting to
keep this out of the way, I've created a separate virthost under the
127.0.0.1 namevirtualhost just for this. This is the configuration

NameVirtualHost 127.0.0.1:80

<VirtualHost 127.0.0.1:80>
ServerAdmin steve [at] yobank.com
ServerName localhost.localdomain
DocumentRoot /www/local
ErrorLog logs/local-default-error_log
CustomLog logs/local-default-access_log common
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from all
</Location>
</VirtualHost>

( currently allow from all, but have tried loads of other options ).

I've created an empty index.html on that location. When I try and test, I
get...

server# curl http://localhost.localdomain/server-status?auto

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator,
steve [at] firetrust.org and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.</p>
<p>More information about this error may be available
in the server error log.</p>
<hr>
<address>Apache/2.0.59 (Unix) mod_ssl/2.0.59 OpenSSL/0.9.8b DAV/2 PHP/4.4.4 Server at localhost.localdomain Port 80</address>
</body></html>


And in the log...

[Thu Aug 09 09:55:06 2007] [error] [client 127.0.0.1] mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary.


There's plenty of other sites on this server that use redirection, but
this isn't one of them, and it's currently set up in the specific
..htaccess file, not the httpd conf file.

httpd -l shows mod-status.c compiled in.

Does anyone have a clue what I'm doing wrong? I've very little hair left!

Steve
Steve [ Do, 09 August 2007 00:01 ] [ ID #1789693 ]

Re: server-status

Post removed (X-No-Archive: yes)
Notifier Deamon [ Do, 09 August 2007 08:57 ] [ ID #1790507 ]

Re: server-status

On Thu, 09 Aug 2007 08:57:19 +0200, Davide Bianchi wrote:

> On 2007-08-08, Steve <steve [at] yobank.com> wrote:
> <zap>
>> keep this out of the way, I've created a separate virthost under the
>> 127.0.0.1 namevirtualhost just for this. This is the configuration
> <zap>
>> NameVirtualHost 127.0.0.1:80
>>
>> ( currently allow from all, but have tried loads of other options ).
>
> If your VHost listen only to 127.0.0.1 the 'allow from all' is kind of a
> joke...
>
>><title>500 Internal Server Error</title>
>
>> [Thu Aug 09 09:55:06 2007] [error] [client 127.0.0.1] mod_rewrite:
>> maximum number of internal redirects reached. Assuming configuration error.
>> Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary.
>
> I think that you are not talking to your VHost but with something else,
> probably with another VHost or some other vhost is in the way. Since you
> didn't posted the rest of your configuration I can't be sure of it of
> course. I'll start with using http://127.0.0.1 in the request and
> possibly check other logs on where the request is processed.
>
> Davide
>

This is driving me insane. It's just on this one server. I have loads of
virtual hosts running on the external ip address, and I've just created
another namevirtualhost 127.0.0.1:80 directive for this site. ( I've even
tried putting it on another port and the error is the same ).

I've created a dummy index.html that returns "Hello World", and when I
connect to http://127.0.0.1/server-status, I see this message ( "Hello
World" ) displayed. I've tried setting up the server-status allow from to
point to other domains/addresses, and it correctly forbids me trying to
run the handler. Errors messages are only appearing in the logs related to
this virtualhost, so it's almost telling me that it's the handler itself
that's causing the problem.

Has anyone ever seen this before? I haven't, and the test machine that's
supposed to be a mirror image of production is working fine!

Any pointers wil hopefully save the 3 hairs I have left!

Cheers, Steve
Steve [ Mi, 15 August 2007 07:47 ] [ ID #1796044 ]
Webserver » alt.apache.configuration » server-status

Vorheriges Thema: VHost
Nächstes Thema: Domain URL; www vs (not www)