Install Nginx 1.0.12 for PHP-FPM on CentOS 6.2

– Make sure to check PHP-FPM, memcached and MYSQL posts.
– get the latest package from

mkdir nginx
cd nginx
tar xfz nginx-1.0.12.tar.gz 
cd nginx-1.0.12

#Change server string
vi src/http/ngx_http_header_filter_module.c
static char ngx_http_server_string[] = "Server:" CRLF;
static char ngx_http_server_full_string[] = "Server:" CRLF;

vi src/http/ngx_http_special_response.c
# replace '"<hr /><center>nginx</center>" CRLF' and '"<hr /><center>" NGINX_VER "</center>" CRLF'
"<hr /><center></center>" CRLF

#create tmp dirs
mkdir /server/tmp /server/tmp/nginx /server/tmp/nginx/client /server/tmp/nginx/fcgi /server/tmp/nginx/proxy
chmod -R 777 /server/tmp

-install Nginx

Dynamic Content Caching using Lighty + mod_magnet + lua

*Updated 11 Jan 2007 to include luazlib, fix lighty config file and add zlib decoding to cache.lua for older browsers
Since I read the documentations for mod_cml, I was very excited to use this module since caching using PHP running as FastCGI is not helping much during server peak load. However, mod_cml was replaced by mod_magnet which is more flexible and gives more control over request handling in Lighttpd. This Article will focus on caching your PHP scripts using Lua and mod_magnet under Lighttpd,