By odnomzagi on
I have a problem with Drupal's original .htaccess file. If i put this file into my apache docroot ( / ) for clean URL-s, i cannot reach the apache statistic page (ExtendedStatus On). From localhost -> http://mydomain/server-status -> I get "page not found" message. If i remove .htaccess file, i can reach the page.
Suspected lines are:
# Rewrite current-style URLs of the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
If i uncomment these lines, my problem is gone.
Any idea? Workaround?
Thanks.
Comments
I'm interested in this as
I'm interested in this as well...
I've been looking into it to get the munin Apache module working (munin polls the server-status URL) but Drupal replies with a 404. Haven't found a way around it yet.
just add a line
I had the same problem and looked at: http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
I just added a line about /server-status
Server-wide Config?
Can anyone suggest a method by which this could be added within Apache's VirtualHost or Directory stanzas, so that if someone else on my team pulls the entire DRUPAL_ROOT across from a development server we don't lose this one addition to .htaccess (happened this weekend ;) ?
I have applied below rule in
I have applied below rule in .htaccess and it worked.
RewriteRule ^(server-info|server-status) - [L]
This Worked For Me
Thank you for this post (over six years later)! This helped me with enabling munin to work on my Drupal site. Per the later comments, it does mean I have to be very careful to remember the .htaccess when I move between environments, or when I upgrade Drupal.
This does work well for those
This does work well for those using Munin or some other monitoring tool with Apache-backed Drupal; one other possible solution would be to set up your virtualhosts so you have a separate local virtualhost (like localhost or whatever.dev) that you can use from the server itself (or call from a monitoring tool on a separate server) to call that URL, without having to change the .htaccess file.
__________________
Personal site: www.jeffgeerling.com
how to fix in the apache config file
you can fix this in the global http.conf by adding a quick:
Alias /server-status /var/www/html
along with the normal tag. the alias overrides .htaccess processing
well, maybe not a fix...
looks like that causes apache to want a trailing slash, so it sends a 301 redirect, which a browser is happy with, but zenoss is not, and munin might be the same way. still digging.
found the answer
just make an empty file somewhere the server allows access, i used /var/www/dummy and then:
Alias /server-status /var/www/dummy
now things are happy.
+1
+1
I just wanted to thank you for sharing this.
+1
worked for me too. thank you.
Yashesh Bhatia