当前位置:首页 > nginx > 正文

linux 查询nginx版本(linux查询nginx目录)

  • nginx
  • 2024-04-06 17:34:02
  • 5498
在 Linux 上查询 Nginx 版本
要查询 Nginx 服务器的版本,可以使用以下命令:
nginx -v
此命令将输出类似以下内容的信息:
nginx version: nginx/1.18.0
built by gcc 8.3.1 20190404 (Red Hat 8.3.1-5)
TLS SNI support enabled
configure arguments: --pre fix=/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=/run/nginx.pid --lock-path=/var/lock/nginx.lock --http-client-body-temp-path=/var/lib/nginx/body --http-proxy-temp-path=/var/lib/nginx/proxy --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --http-scgi-temp-path=/var/lib/nginx/scgi --pre fix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib64/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-proxy-temp-path=/var/lib/nginx/proxy --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --http-scgi-temp-path=/var/lib/nginx/scgi
输出信息包括:
Nginx 版本号
编译器版本
TLS SNI 支持状态
编译时的配置参数
可以通过查看 configure arguments 部分来获取有关 Nginx 编译的更多信息。