Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: WAMP and phpinfo security |
|
Author |
|
Qmpeltaty
Joined: 06 Feb 2008 Posts: 182 Location: Poland
|
Posted: Tue 25 May '10 12:59 Post subject: WAMP and phpinfo security |
|
|
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
|
Posted: Wed 26 May '10 15:42 Post subject: Re: WAMP and phpinfo security |
|
|
Solution :
RewriteEngine On
RewriteCond %{REMOTE_ADDR} !192\.168\.1\.
RewriteCond %{QUERY_STRING} phpinfo [NC]
RewriteRule ^(.*)$ index.php [F,L] |
|
Back to top |
|
|
|
|
|
|