# Nginx build ./configure options

**URL:** <https://www.ruby-forum.com/t/nginx-build-configure-options/185503>\
**Category:** NGINX\
**Created:** [March 21, 2010, 8:22pm UTC](https://www.ruby-forum.com/t/nginx-build-configure-options/185503 "2010-03-21T20:22:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vys](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/4bbf92/32.png) [@vys](https://www.ruby-forum.com/u/vys)\
**Post date:** [March 21, 2010, 8:22pm UTC](https://www.ruby-forum.com/t/nginx-build-configure-options/185503/1 "2010-03-21T20:22:18Z")

</div>

Hi,  
I want to get a highly optimized and hardened build of nginx using gcc  
for  
running on Linux 2.6 kernel. What are the compile time options  
recommended  
for this purpose?  
Specifically what --with-cc-opt, ld-opt etc should I pass? -O3,  
FORTIFY\_SOURCE, -fpie, -pie etc?

Thanks,  
Vinay
