Added support into vhosts to hide ini files, either with a 403 or a 404 error. Updated documentation to reflect changes in vhosts file as well as explain how to enable 403 and 404 return codes.

This commit is contained in:
Gareth J. Greenaway 2011-09-07 20:04:56 +00:00
parent ade8521f16
commit 97e985ee0b
5 changed files with 49 additions and 0 deletions

View file

@ -72,6 +72,18 @@ Now you'll need to replace instances of `/path/to/openphoto/html/directory` with
vi /etc/apache2/sites-enabled/openphoto-vhost.conf
By default, any access to ini files is denied with a "Not Found" 404 HTTP code. To enable a 404, or Forbidden return code, change the following lines in the virtual host file.
Uncomment:
# 403 Forbidden for ini files
#RewriteRule \.ini$ - [F,NC]
Comment:
# 404 Not Found for ini files
AliasMatch \.ini$ /404
### PHP
You should also verify that your `php.ini` file has a few important values set correctly.