Nginx配置文件和编译参数

Nginx配置文件

[root@localhost ~]# rpm -ql nginx
/etc/logrotate.d/nginx  //日志轮转
/etc/nginx
/etc/nginx/conf.d  //子配置文件
/etc/nginx/conf.d/default.conf  //默认的网站配置文件
/etc/nginx/fastcgi_params  //动态网站模块文件 Python,php所需的相关变量
/etc/nginx/mime.types  //文件关联程序——网站文件类型和相关处理程序
/etc/nginx/modules  //模块文件夹,第三方模块
/etc/nginx/nginx.conf  //总配置文件
/etc/nginx/scgi_params
/etc/nginx/uwsgi_params
/usr/lib/systemd/system/nginx-debug.service  //Nginx调试程序启动脚本
/usr/lib/systemd/system/nginx.service  //服务脚本
/usr/lib64/nginx
/usr/lib64/nginx/modules
/usr/libexec/initscripts/legacy-actions/nginx
/usr/libexec/initscripts/legacy-actions/nginx/check-reload
/usr/libexec/initscripts/legacy-actions/nginx/upgrade
/usr/sbin/nginx   //主程序
/usr/sbin/nginx-debug
/usr/share/doc/nginx-1.24.0
/usr/share/doc/nginx-1.24.0/COPYRIGHT
/usr/share/man/man8/nginx.8.gz
/usr/share/nginx
/usr/share/nginx/html
/usr/share/nginx/html/50x.html
/usr/share/nginx/html/index.html
/var/cache/nginx //缓存各种  
/var/log/nginx   //日志文件夹

Nginx编译参数

[root@localhost ~]# nginx -V
nginx version: nginx/1.24.0
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) 
built with OpenSSL 1.0.2k-fips  26 Jan 2017
TLS SNI support enabled
configure arguments: 
//基本配置
--prefix=/etc/nginx  //安装路径
--sbin-path=/usr/sbin/nginx  //程序文件
--modules-path=/usr/lib64/nginx/modules  //模块路径 
--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 //程序ID
--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 //PHP缓存
--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp //Python缓存
--http-scgi-temp-path=/var/cache/nginx/scgi_temp 
//模块类
--user=nginx //用户
--group=nginx //组
--with-compat //启用动态模块兼容性
--with-file-aio //提高性能,异步非阻塞
--with-threads //多线程模块
--with-http_addition_module //响应之前或之后追加文本内容,比如想在站点追加一个js广告或者新增的css样式
--with-http_auth_request_module //认证模块
--with-http_dav_module //增加上传put,delete,mkcol 创建集合,copy和move方法,默认情况下为关闭
--with-http_flv_module //Nginx添加MP4,flv视频支持模块
--with-http_gunzip_module //压缩模块
--with-http_gzip_static_module 
--with-http_mp4_module //多媒体模块
--with-http_random_index_module 
--with-http_realip_module //Nginx获取真实IP模块
--with-http_secure_link_module //Nginx安全下载模块
--with-http_slice_module //Nginx中文文档
--with-http_ssl_module //安全模块
--with-http_stub_status_module //访问模块
--with-http_sub_module //Nginx替换网站响应内容
--with-http_v2_module 
--with-mail //邮件客户端模块
--with-mail_ssl_module 
--with-stream //负载均衡模块
--with-stream_realip_module 
--with-stream_ssl_module 
--with-stream_ssl_preread_module 
//CPU
--with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC' 
--with-ld-opt='-Wl,-z,relro -Wl,-z,now -pie'

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值