logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: WAMP and phpinfo security
Author
Qmpeltaty



Joined: 06 Feb 2008
Posts: 182
Location: Poland

PostPosted: Tue 25 May '10 12:59    Post subject: WAMP and phpinfo security Reply with quote

I would like to hide phpinfo alias from public view, restrict it by IP filters.

Alias address is https://www.mydomain.com/?phpinfo=1. That's why i put LocationMatch to httpd.conf to resttrict access from localhost only but it doesn't work (still readable from anywhere).

<LocationMatch "^/\?phpinfo=1">
Order allow,deny
Allow from localhost
Deny from all
</LocationMatch>

How to fix it?
Back to top
Qmpeltaty



Joined: 06 Feb 2008
Posts: 182
Location: Poland

PostPosted: Wed 26 May '10 15:42    Post subject: Re: WAMP and phpinfo security Reply with quote

Solution :

RewriteEngine On
RewriteCond %{REMOTE_ADDR} !192\.168\.1\.
RewriteCond %{QUERY_STRING} phpinfo [NC]
RewriteRule ^(.*)$ index.php [F,L]
Back to top


Reply to topic   Topic: WAMP and phpinfo security View previous topic :: View next topic
Post new topic   Forum Index -> Apache