rcapache2 server-status does not work

rcapache2 server-status

HTTP 400: Bad Request

w3m -dump -cols 80 https://localhost/server-status

HTTP 404: Not Found

What next?

Works for me. What release of openSUSE do you have?

The modules status and info are off by default, enabling them fixes HTTP 404.

In order to fix HTTP 400, you have to edit the STATUSURL in the apache2ctl script:


However, this script is not registered as a configuration file, and hence it is not editable:

rpm '-qc' 'apache2'

Besides, if your server is self-signed, because of a bug in w3m you have to say

yes | rcapache2 server-status

because otherwise w3m waits for your input without any prompt whatsoever.

On Sat, 13 Nov 2010 18:06:01 +0530, yecril71pl
<yecril71pl@no-mx.forums.opensuse.org> wrote:

> --------------------
> rcapache2 server-status
> --------------------
> HTTP 400: Bad Request

try “rcapache2 status” instead.


On Sat, 13 Nov 2010 18:36:01 +0530, ken yap
<ken_yap@no-mx.forums.opensuse.org> wrote:

> Works for me. What release of openSUSE do you have?

i’m using oS 11.3 and get the same error message as the OP when trying
“rcapache2 server-status”. “rcapache2 status” works for me.


The certificate prompt is missing because w3m writes it to stdout.

FTR: w3m bug report:

In theory this should eliminate the requirement for the yes program:

w3m -o ssl_verify_server=false -dump -cols 80 https://localhost/server-status

but I couldn’t get it to work and it appears to be another w3m bug or the documentation is misleading.

If you can do with the raw HTML status from the server status page, then perhaps curl is a better tool:

curl -k https://localhost/server-status

If you are doing any kind of organised monitoring, have a look at nagios, which includes server status in its apache monitoring plugin.

Modifying the invocation of w3m would mean changing the script apache2ctl, and this script is not modifiable (except by the packager).

How do you even get apache2ctl to use the https URL since it’s hardwired into apache2ctl? Is there a reason why you want to use the https URL?