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.

mod_status is a apache module that lets you see the status of apache. After its switched on, it can be accessed at server.com/server-status, however I cant access it because of the mod_rewrite in the .htaccess file. below is the .htaccess file.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} othersite.com$ [NC]
RewriteRule ^(.*)$ http://server.com/$1 [R=301]


RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

</IfModule>

when I disable above, http://server.com/server-status works. This is probably a common issue with mod_rewrite, but i'm not sure how to fix it.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

This is a common issue with CMS software that handle all non-file URLs. You may modify the rewrite block to include an explicit condition on /server-status:

RewriteCond %{REQUEST_URI} !=/server-status
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
share|improve this answer
add comment

You need to use following documentation (Apache Virtual Host documentation - Apache HTTP Server) and reconfigure it so that you'll use VirtualHost for your domain and leave welcome page alone, this way you'll be able to use it for server-status. That would be a correct way of doing things anyway...

share|improve this answer
    
do you know anything about plesk? Its not as straight forward as doing that. I cant edit default virtual host. It has to have a domain/subscription. I tried setting up a dummy host and making that default but it didnt work. Is there an alternative ie rewriting the .htaccess file to ignore a URL. –  madphp Jan 14 '13 at 21:58
add comment

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.