Nginx安装配置,随时更新

./configure --prefix=/etc/nginx \  #指定安装目录
--sbin-path=/usr/sbin/nginx \  #指定执行路径
--conf-path=/etc/nginx/nginx.conf \  #指定配置文件路径
--error-log-path=/var/log/nginx/error.log \  #指定错误日志路径
--http-log-path=/var/log/nginx/access.log \  #指定访问日志路径
--pid-path=/var/run/nginx.pid \  #指定默认pid号文件路径
--lock-path=/var/run/nginx.lock \  #指定文件锁
--http-client-body-temp-path=/var/cache/nginx/client_temp \  #指定客户端访问时产生的临时文件存放目录
--http-proxy-temp-path=/var/cache/nginx/proxy_temp \  #指定存储承载从代理服务器接收到的数据的临时文件定义目录
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp \  #指定fastcgi临时文件路径
--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp \  #指定uwsgi临时文件路径
--http-scgi-temp-path=/var/cache/nginx/scgi_temp \  #指定scgi临时文件路径
--user=nginx \  #指定系统用户名称
--group=nginx \  #指定系统用户组
--with-http_ssl_module \  #安装http_ssl模块,一般用于支持https
--with-http_realip_module \  #安装获取真实IP模块
--with-http_addition_module \  #安装响应追加模块
--with-http_sub_module \  #安装替换网站响应内容模块
--with-http_dav_module \  #安装为Http webDAV 增加 PUT, DELETE, MKCOL, COPY 和 MOVE 等方法的模块
--with-http_flv_module \  #安装提供服务端伪流媒体支持模块
--with-http_mp4_module \  #安装提供服务端MP4流媒体支持
--with-http_gunzip_module \  #安装支持gunzip解码方法的模块
--with-http_gzip_static_module \  #安装支持gzip解码方法的模块
--with-http_random_index_module \  #安装显示随机首页模块
--with-http_secure_link_module \  #安装安全(私密)下载模块
--with-http_stub_status_module \  #安装监控nginx运行状态模块
--with-http_auth_request_module \  #安装内部子请求的访问和控制模块
--with-threads \  #安装线程池模块
--with-stream \   #安装四层协议的转发、代理或者负载均衡模块
--with-stream_ssl_module \  #安装四层协议的转发、代理或者负载均衡支持https模块
--with-mail \  #安装邮件模块
--with-mail_ssl_module \  #安装邮件支持https模块
--with-file-aio \  #安装aio模块 (咱也不知道是干啥的)
-with-http_image_filter_module #安装支持图片传输模块
--with-ipv6 \  #安装支持IPV6模块
--with-http_spdy_module \  #安装spdy网络优化模块 版本高于1.9.5使用--with-http_v2_module
--with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'  #CC编译器配置

猜你喜欢

转载自www.cnblogs.com/Juststudy02/p/9045827.html