Setting up a new CentOS 6 web server with nginx and php-fpm

Sometimes as developers we have to perform some simple sysadmin tasks, such as installing a basic LAMP or LEMP stack, basic securing of the server and so on. So what I decided to do is to just gather links to various helpful resources on how to setup Nginx + PHP 5.4 + MySQL + memcached on CentOS 6. I chose this installation since its the one I happen to use the most and I personally believe the optimal one. An alternative might be Apache + mod_php + Varnish + memcached.

Basic SSH setup and hardening:

Basic firewalls and IpTables:

Nginx, PHP and PHP-FPM


Memcached and Redis

Lastly, I dont use any FTP on my servers, but you can easily roll out a fairly secure SFTP connection:

which will be supported by most decent FTP clients. Let me know if you have any other good resources in the comments.