下载nginx源码包,编译命令之一:
./configure
--prefix=/usr/local/nginx
--conf-path=/usr/local/webserver/nginx/nginx_tomcat.conf
--pid-path=/usr/local/webserver/nginx/nginx.pid
--error-log-path=/var/log/nginx/error.log
--http-log-path=/var/log/nginx/access.log
--user=apache
--group=apache
--with-http_stub_status_module
--with-http_ssl_module
--with-http_gzip_static_module
--with-http_flv_module
--with-cc-opt="-I /usr/include/pcre"
或者用pcre的源码来编译。
--------------------------------------------------------
./configure \
--prefix=/usr/local/nginx \
--conf-path=/usr/local/webserver/nginx/nginx.conf \
--pid-path=/usr/local/webserver/nginx/nginx.pid \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--user=nginx \
--group=nginx \
--with-http_stub_status_module \
--with-http_ssl_module \
--with-http_gzip_static_module \
--with-http_flv_module \
--with-pcre=/usr/local/webserver/source/pcre \
--with-openssl=/usr/local/webserver/source/openssl \
--with-http_ssl_module \
--with-zlib=/usr/local/webserver/source/zlib