Nginx源码安装以及FPM的整合
All modules enabled
The next situation: the whole package. All modules are enabled and it is up to you whether you want to use them or not at runtime.
./configure --user=www-data --group=www-data
--with-http_ssl_module --with-http_realip_module --with-http_addition_module
--with-http_xslt_module --with-http_image_filter_module --with-http_geoip_module
--with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_gzip_static_module
--with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module
With this setup, all optional modules are enabled, thus requiring additional libraries to be installed—libgeoip for the Geo IP module, libgd for the Image Filter module, libxml2, and libxslt for the XSLT module. You may install those prerequisites using your system package manager such as running yum install libxml2 or
apt-get install libxml2.
GZIP
http块中配置
http {
include mime.types;
default_type application/octet-stream;
gzip on;
gzip_min_length 5000;
gzip_min_length 1k;
gzip_buffers 4 8k;
gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_proxied any;
gzip_comp_level 2;
ignore_invalid_headers on;
}
浙公网安备 33010602011771号