Nginx基本配置

2019-06-29  本文已影响0人  曾经的飞舞梦

--modules-path=/usr/lib64/nginx/modules                模块路径

--pid-path=/var/run/nginx.pid                                    程序ID

--lock-path=/var/run/nginx.locak                            锁路径,防止重新启动Nginx

--http-client-body-temp-path=/var/cache/nginx/client_temp        缓存

--http-fastcgi-temp-path=/var/cache/nginx/proxy_temp       代理缓存

--http-fastcgit-temp-path=/var/cache/nginx/fastcgi_temp      php缓存

--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp    python缓存

--with-compat            启动模块兼容性

--user=nginx            用户

--group=nginx            组

--with-file-aio        使用nginx的aio特性会大大提高性能,比如图片站的特点是大量的IO操作,Nginx  AIO不用等待每次IO的结果,有助于并发处理大量的IO和提高Nginx处理效率

        AIO的优点就是能够提交多个IO请求给内核,然后直接由内核的IO调度算法去处理这些请求(directio),这样的话,内核就有可能执行一些合并,节约了读取文件的处理时间,就是异步非阻塞。

--with-threads        多线程模块

--with-http_addition_module   在响应之前或者响应之后追加文本内容,比如想在站点底部追加一个js或者css,可以使用这个模块来实现。

--with-http_auth_request_module        认证模块

--with-http_dav_modeule                     使应用程可直接对webserver直接读写,并支持文件锁定及解锁,还支持文件的版本控制。启用对WebDav协议支持。

--with-http_flv_module        Nginx增加MP4,FLV视频支持模块

--with-http_gunzip_module        压缩模块

--with-http_mp4_module            多媒体模块

--with-http_random_index_module        Nginx显示随机首页模块,对隐藏文件不起作用。

--with_http_realip_module                Nginx获取真实IP模块

--with-http_secure_link_module        Nginx安全下载模块

--with-http_sice_module            Nginx中文文档

--wiht-http-_ssl_module            安全模块

--with-http_stub_status_module          访问状态  

--wiht-http_stub_module            Nginx替换网站响应内容

--with-mail            邮件客户端

--with-stream            负载均衡模块,Nginx从1.9.0开始,新增加了一个ngx_stream_core_module模块,默认编译的时候该模块并未编译进去,需要编译的时候加--with-stream,使其支持stream代理。用来实现四层协议的转发,代理或者负载均衡。

--with-stream_realip_module            

上一篇 下一篇

猜你喜欢

热点阅读