New answers tagged apache
Where to place PHP files for security? Put in mind that there is no best place to store your files safely. The safety of your sensible files is only a result of a combination of good measures -such as preventing URL injections that may disclose your sensitive files- you may take and discussed below briefly. My thought is it should follow the ...
Place your public files in a folder called public and point your domain name to this folder using apache virtual host, other non-public files should be in folders above the public folder and you can refer to them by include_path for example. This is how most frameworks are structured.
Basically you are right: on a server you own there is no actual need to place the PHP files in the document root directory. Only is needed some entry point like an index.php file or any other file targeted by your rewrite rules. Once the web-server hand-hovers the request processing to the PHP interpreter, you are not bound anymore by the web-server's ...
This is the (URL) decoded value: POST /cgi-bin/php?-d allow_url_include=on -d safe_mode=off -d suhosin.simulation=on -d disable_functions="" -d open_basedir=none -d auto_prepend_file=php://input -d cgi.force_redirect=0 -d cgi.redirect_status_env=0 -n This log entry tells me that an attempt has been made to exploit a PHP-CGI vulnerability from ...
Top 50 recent answers are included