Securing Linux & PHP

MOD_REWRITE OVERVIEWhttp://www.sitepoint.com/article/guide-url-rewritinghttp://www.jeffdarlington.com/tag/mod_rewrite/ LINUX SECURE CONFIGhttp://aymanh.com/tips-to-secure-linux-workstation PHP SECURE CONFIGhttp://aymanh.com/checklist-for-securing-php-configuration MOD_REWRITE SCRIPTS FOR APACHESIMPLEST SET OF RULES================================================================== #Turn on mod_rewriteRewriteEngine OnRewriteOptions inheritRewriteLog “/var/log/httpd/rewrite_log” # Prevent harmful binary execution through injectionRewriteCond %{REQUEST_URI}?%{QUERY_STRING} (.*)chmod(.*) [OR]RewriteCond %{REQUEST_URI}?%{QUERY_STRING} (.*)chown(.*) [OR]RewriteCond %{REQUEST_URI}?%{QUERY_STRING} (.*)wget(.*) [OR]RewriteCond %{REQUEST_URI}?%{QUERY_STRING} (.*)cmd(.*) [OR]RewriteCond %{REQUEST_URI}?%{QUERY_STRING} (.*)cd%20(.*) [OR]RewriteCond %{REQUEST_URI}?%{QUERY_STRING} (.*)scp(.*) [OR]RewriteCond %{REQUEST_URI}?%{QUERY_STRING} (.*)curl(.*) [OR] # Disable TRACE & TRACK methodsRewriteCond […]