Deny access to all .php files in a folder using htaccess

In order to further harden a folder, for example an ‘uploads’ folder as used by WordPress, it maybe appropriate to block the execution of key file types. If you have a specific folder where content can be more easily written, blocking execution of script files will help reduce the chance of an attacker executing a …

Continue reading ‘Deny access to all .php files in a folder using htaccess’ »

Basic web server backup script – MySQL and Apache

I was working on a dedicated server the other day and needed a quick script to backup the website and the MySQL database. The following bash script will do just that, simply modify the directory paths within the tar command to ensure every folder you need is included, the MySQL command assumes all databases need …

Continue reading ‘Basic web server backup script – MySQL and Apache’ »