查找nginx版本? [英] Find nginx version?
问题描述
我已按照以下步骤在Debian 7上安装了nginx
I have installed nginx on Debian 7 with the following steps
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install nginx
sudo service nginx start
我已经确认这是通过从浏览器访问hostip来启动nginx的.如何找出Nginx的版本?
I have confirmed that this starts nginx by accessing the hostip from the browser. How do I find out the version of nginx?
nginx -v
失败,并显示'command not found
错误
我确认usr/sbin目录中存在nginx,并且该目录已添加到$ PATH变量中
I verified that nginx exists in the usr/sbin directory and that directory is added to the $PATH variable
推荐答案
似乎您的nginx尚未正确安装.注意安装命令的输出:
It seems that your nginx hasn't been installed correctly. Pay attention to the output of the installation commands:
sudo apt-get install nginx
要检查nginx版本,可以使用以下命令:
To check the nginx version, you can use this command:
$ nginx -v
nginx version: nginx/0.8.54
$ nginx -V
nginx version: nginx/0.8.54
TLS SNI support enabled
configure arguments: --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-debug --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_realip_module --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-http_xslt_module --with-ipv6 --with-sha1=/usr/include/openssl --with-md5=/usr/include/openssl --with-mail --with-mail_ssl_module --add-module=/build/buildd/nginx-0.8.54/debian/modules/nginx-upstream-fair
有关更多信息: http://nginxlibrary.com/check-nginx-version/
您可以使用-v
参数仅显示Nginx版本,或使用-V
参数显示版本以及编译器版本和配置参数.
You can use -v
parameter to display the Nginx version only, or use the -V
parameter to display the version, along with the compiler version and configuration parameters.
这篇关于查找nginx版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!