Newbie questions about nginx (moving from apache)

Igor Sysoev igor at
Fri May 27 12:24:14 MSD 2011

On Fri, May 27, 2011 at 04:14:49AM -0400, pk899 wrote:
> Hi 
> sorry for english. 
> i am on centos 64 bit server with cpanel and whm. 
> i have apache 2.2.18 and there is heavy duty use of the following: 
> 1. mod rewrite 
> 2. mod geoip
> 3. mod security (with rules available in 2.6.0 for google safe browsing
> checks etc)  
> 4. mod evasive 
> 5. php5 functionality with memcached + eaccelerator 
> for #1, i see from threads on this phorum that some rewriting
> functionality is possible. i also see that in 1.0.3 the #2 of geoip is
> possible. 
> but i am not sure about 3, 4 and 5. nginx does not support DDOS
> protection right? also, will all the php5 modules work with pecl such as
> memcached etc? 
> in trying to set up nginx, i have problem getting php to work. mod fcgi
> -- is there simple instruction about how to do, and how is the
> performance when compared to apache+eaccelerator which opcode caches? 
> because of this functionality, i don't want to move entire to nginx. 
> so i am trying this: nginx run on localhost on port 81. apache is main
> front server on port 80. all static content from images folder need to
> pass to nginx. i am trying this code in apache: 
> ProxyRequests       Off
> ProxyPreserveHost   On
> ProxyPass           /mysite/images
> ProxyPassReverse    / 
> But this is not working. 
> Nginx root folder is "/mysite/images". And when I type in browser
> http://MYDOMAIN.COM:81 then I can see the nginx working fine. the images
> are there. 
> any idea about how i can make this setup work? 
> or ideally, over time i want to move entirely to nginx. so would
> appreciate some experienced thought or guidance. 

You should use instead of
However, it's better to set nginx before Apache and all except
"/mysite/images" to the Apache. 
nginx has not mod_security functionality.
There is some functionality similar to mod_evasive in limit_req.

Igor Sysoev

More information about the nginx mailing list