# Trying to figure if nginx can be used

**URL:** <https://www.ruby-forum.com/t/trying-to-figure-if-nginx-can-be-used/204431>\
**Category:** NGINX\
**Created:** [March 11, 2011, 8:25pm UTC](https://www.ruby-forum.com/t/trying-to-figure-if-nginx-can-be-used/204431 "2011-03-11T20:25:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [March 11, 2011, 8:25pm UTC](https://www.ruby-forum.com/t/trying-to-figure-if-nginx-can-be-used/204431/1 "2011-03-11T20:25:31Z")

</div>

Hi,

I’ve googled trying to find out the answers to my questions and a few  
remained unanswered / inconclusive.

I plan to replace my apache server with nginx. I currently use:

a) mod\_deflate to compress the pages  
b) mod\_expires to add expires headers to certain images  
c) mod\_rewrite to, well, rewrite the requests to a bootstrap index.php  
(Zend  
Framework)  
d) support php  
e) support for SSL  
f) support for name based virtual hosts

I’ve found that nginx has built-in support for compression, support for  
virtual servers (name based), SSL and can host php scripts. But:  
a) does it support similar configuration like the one below?

\<Directory “/var/www/html”\>  
SetOutputFilter DEFLATE  
BrowserMatch ^Mozilla/4 gzip-only-text/html  
BrowserMatch ^Mozilla/4.0[678] no-gzip  
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html  
SetEnvIfNoCase Request\_URI   
.(?:gif|jpe?g|png|zip|exe|mp3)$ no-gzip dont-vary  
Header append Vary User-Agent env=!dont-vary

b) Are there any known limitations or disadvantages on hosting PHP with  
nginx?
