配置文件
查看所有文件
sh
rpm -ql nginx
文件路径说明
/etc/logrotate.d/nginx
:配置 Nginx 日志轮换的文件,用于自动管理和滚动日志文件/etc/nginx
:Nginx 的主配置目录,包含各种配置文件和其他子目录/etc/nginx/conf.d
:用于存放额外的 Nginx 配置文件,可以包含多个配置文件来扩展主配置/etc/nginx/conf.d/default.conf
:默认的 Nginx 配置文件,通常包含基本的服务器配置/etc/nginx/fastcgi_params
:包含 FastCGI 协议相关的参数设置/etc/nginx/mime.types
:定义了 MIME 类型与文件扩展名的映射关系/etc/nginx/modules
:存放 Nginx 模块配置或模块列表/etc/nginx/nginx.conf
:Nginx 的主要配置文件/etc/nginx/scgi_params
:包含 SCGI (Simple Common Gateway Interface) 参数设置/etc/nginx/uwsgi_params
:包含 uWSGI 协议相关的参数设置/usr/lib/systemd/system/nginx-debug.service
:为调试版本的 Nginx 创建的 systemd 服务单元文件/usr/lib/systemd/system/nginx.service
:为生产版本的 Nginx 创建的 systemd 服务单元文件/usr/lib64/nginx
:包含 Nginx 库文件的目录/usr/lib64/nginx/modules
:Nginx 动态模块存放位置/usr/libexec/initscripts/legacy-actions/nginx
:传统初始化脚本相关动作的存放位置/usr/libexec/initscripts/legacy-actions/nginx/check-reload
:用于检查并重载 Nginx 配置的脚本/usr/libexec/initscripts/legacy-actions/nginx/upgrade
:用于升级 Nginx 的脚本/usr/sbin/nginx
:Nginx 主执行文件/usr/sbin/nginx-debug
:调试版本的 Nginx 执行文件/usr/share/doc/nginx-1.26.1
:文档目录,包含 Nginx 版本的文档资料/usr/share/doc/nginx-1.26.1/COPYRIGHT
:包含版权信息的文件/usr/share/man/man8/nginx.8.gz Nginx
:的手册页,以压缩格式存储/usr/share/nginx
:默认网站根目录/usr/share/nginx/html
:默认网站 HTML 文件存放位置/usr/share/nginx/html/50x.html
:默认的服务器错误页面/usr/share/nginx/html/index.html
:默认首页文件/var/cache/nginx
:缓存目录,用于存储 Nginx 的缓存数据/var/log/nginx
:日志目录,存放 Nginx 的访问日志和错误日志
编译参数
查看编译参数
sh
nginx -V
编译参数说明
--prefix=/etc/nginx
: 指定 Nginx 的安装前缀目录,默认为 /etc/nginx。--sbin-path=/usr/sbin/nginx
: 指定 Nginx 可执行文件的路径,默认为 /usr/sbin/nginx。--modules-path=/usr/lib64/nginx/modules
: 指定 Nginx 模块路径,默认为 /usr/lib64/nginx/modules。--conf-path=/etc/nginx/nginx.conf
: 指定 Nginx 主配置文件的路径,默认为 /etc/nginx/nginx.conf。--error-log-path=/var/log/nginx/error.log
: 指定 Nginx 错误日志文件的路径,默认为 /var/log/nginx/error.log。--http-log-path=/var/log/nginx/access.log
: 指定 Nginx 访问日志文件的路径,默认为 /var/log/nginx/access.log。--pid-path=/var/run/nginx.pid
: 指定 Nginx 进程 ID 文件的路径,默认为 /var/run/nginx.pid。--lock-path=/var/run/nginx.lock
: 指定 Nginx 锁文件的路径,默认为 /var/run/nginx.lock。--http-client-body-temp-path=/var/cache/nginx/client_temp
: 指定客户端请求体临时文件的路径,默认为 /var/cache/nginx/client_temp。--http-proxy-temp-path=/var/cache/nginx/proxy_temp
: 指定代理请求临时文件的路径,默认为 /var/cache/nginx/proxy_temp。--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp
: 指定 FastCGI 请求临时文件的路径,默认为 /var/cache/nginx/fastcgi_temp。--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp
: 指定 uWSGI 请求临时文件的路径,默认为 /var/cache/nginx/uwsgi_temp。--http-scgi-temp-path=/var/cache/nginx/scgi_temp
: 指定 SCGI 请求临时文件的路径,默认为 /var/cache/nginx/scgi_temp。--user=nginx
: 指定 Nginx 运行的用户,默认为 nginx。--group=nginx
: 指定 Nginx 运行的组,默认为 nginx。--with-compat
: 启用兼容模式。--with-file-aio
: 启用异步 I/O 支持。--with-threads
: 启用线程支持。--with-http_addition_module
: 启用 HTTP Addition 模块。--with-http_auth_request_module
: 启用 HTTP Auth Request 模块。--with-http_dav_module
: 启用 HTTP DAV 模块。--with-http_flv_module
: 启用 HTTP FLV 模块。--with-http_gunzip_module
: 启用 HTTP Gunzip 模块。--with-http_gzip_static_module
: 启用 HTTP Gzip Static 模块。--with-http_mp4_module
: 启用 HTTP MP4 模块。--with-http_random_index_module
: 启用 HTTP Random Index 模块。--with-http_realip_module
: 启用 HTTP Real IP 模块。--with-http_secure_link_module
: 启用 HTTP Secure Link 模块。--with-http_slice_module
: 启用 HTTP Slice 模块。--with-http_ssl_module
: 启用 HTTP SSL 模块。--with-http_stub_status_module
: 启用 HTTP Stub Status 模块。--with-http_sub_module
: 启用 HTTP Substitution 模块。--with-http_v2_module
: 启用 HTTP/2 模块。--with-mail
: 启用邮件支持。--with-mail_ssl_module
: 启用邮件 SSL 模块。--with-stream
: 启用 Stream 模块。--with-stream_realip_module
: 启用 Stream Real IP 模块。--with-stream_ssl_module
: 启用 Stream SSL 模块。--with-stream_ssl_preread_module
: 启用 Stream SSL Preread 模块。