How to force Nginx to redirect site name without-www to ‘www’

If you have a domain, ‘example.com’ and you want it to be available both when a user enters, ‘http://example.com’ and ‘http://www.example.com’, and you are running Nginx on your server, you can do so by updating the Nginx conf file for that Site. This file can usually be found in /etc/nginx/sites-available/ folder. Open the file and …

How to increase PHP file upload limit with PHP FPM and Nginx

If while uploading a file you get an error with the following text in it : “client intended to send too large body:” You can fix this error by increasing the PHP File-Upload Limit as following : Step 1: Open php.ini file nano /etc/php5/fpm/php.ini And update ‘upload_max_filesize’ and ‘post_max_size’ values upload_max_filesize = 150M post_max_size = …

How to protect your WordPress site from Brute Force Attacks (WordPress + Nginx + fail2ban)

One of the most common attacks are Brute Force attacks on your WordPress site’s xmlrpc.php or wp-login.php. In a brute force attack the malicious script, which runs off server, tries a number of login combinations until it gains access to the site. We will be using Fail2Ban framework. This framework monitors the server log files …

WordPress Multisite with Nginx

If you are setting up a WordPress multisite, you might notice that the WordPress install displays the Apache settings for the .htaccess file, but does not provide any settings for Nginx. How to setup WordPress Multisite Open the wp-config.php file and add the following line /* Multisite */ define(‘WP_ALLOW_MULTISITE’, true); Select the type of Multisite …

How To Install (LEMP), Linux, nginx, MySQL, PHP stack on Ubuntu 12.04

https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-12-04 L – Linux E – Nginx (Pronounced Engine-X) M – MySQL P – PHP Step 1 Log in to your Linux server with the root user. This has taken care of the ‘L’ of LEMP. Step 2 Next we will update all the softwares to the latest versions sudo apt-get update Step 3 Install …