Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to get Munin's various Apachie plugins to work on my web server, but I'm hitting issues. Upon asking Munin to check available plugins, two of the three Apache plugins return an error saying that "apache server-status cannot be found.'

I've got mod_status turned on etc, and as far as I know, everything's set up correctly.

I've tried opening localhost/server-status using Lynx, at which point I get a 404 error and my Wordpress error page is shown (the one you get when you try to access a page that doesn't exist.)

Now presumablty this is something to do with how I have Apache serving a Wordpress install etc. The web site lives in /var/www/wordpress, with the Index.php file one level up and the .htaccess file amended as per the Wordpress instructions. It works fine, but I've a niggling feeling that when Munin/Lynx tries to load localhost/server-status, it's looking for it in /var/www/.....

So, how do I tell Apache where to actually look when requesting server-status?

Cheers.

EDIT: Here's my httpd.conf file.

ServerName localhost



<VirtualHost *:80>
ServerName oliverhaslam.com
ServerAlias oliverhaslam.com
DocumentRoot /var/www/wordpress/
</VirtualHost>


<VirtualHost *:80>
ServerName ojhaslam.co.uk
ServerAlias ojhaslam.co.uk
DocumentRoot /var/sites/photo365/
</VirtualHost>

<VirtualHost *:80>
ServerName www.ojhaslam.co.uk
ServerAlias www.ojhaslam.co.uk
RedirectMatch permanent /(.*) http://ojhaslam.co.uk/$1
DocumentRoot /var/sites/photo365/
</VirtualHost>

<Location /server-status>
        SetHandler server-status
        Order deny,allow
        Allow from  all
</Location>

If I remove the last part, I get a 'forbidden' error instead of the error outlined above.

EDIT:

Appears the issue is my .htaccess file. Removing that means the server-status works, but obviously Wordpress links don't. Here's the file:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

#Next two don't fix the issue.    
#RewriteCond %{REQUEST_URI} !=/server-status
#RewriteRule ^(server-info|server-status) - [L]

RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
share|improve this question
    
What are the relevant sections of Apache's configs for your WordPress site, and enabling mod_status? –  becomingwisest Jan 15 '13 at 4:38
    
Added to original post. –  Oliver Haslam Jan 15 '13 at 17:05

1 Answer 1

up vote 2 down vote accepted

Wordpress's .htaccess file sends all non-existing files and directories to be processed by Wordpress. Try excluding the server status urls too.

RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/server-status
RewriteRule . /index.php [L]
share|improve this answer
    
Thanks. This didn't actually fix the issue, as you can see in my edit above, but it will work for some. I had to use the other excluded line from above but leave this one hashed out to make it work. My problem was having them both de-commented together. –  Oliver Haslam Jan 16 '13 at 11:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.