Finding your NginX version is a simple process that can be completed in just a couple of steps. We’ve assembled some brief tutorials for Linux and other Unix-like operating systems. These are intended to help you determine your NginX version, as well as troubleshoot errors that may arise. If you need NginX support beyond this tutorial, consider A-Team Systems! Our experts will get you the help you need quickly and affordably. There are two easy commands that will allow you to see your NginX version in slightly different ways. This is your current Nginx version displayed as clearly and simply as possible. Note: This syntax uses a capital V instead of a lowercase v. It will return the NginX and compiler version, as well as the configure parameters. Now you have your current NginX
version, as well as additional compiler and configuration details. A final unconventional way to find your NginX version involves making a wrong file request. If NginX is using the default configuration, it will return a 404 with the NginX version below the error message body. If the methods above didn’t work for you, it’s worth checking to see if NginX is actually installed and running. Use the
following command: $ ps -auxww | grep nginx The ps command will return running processes. Sending it to grep allows us to find specific words in the output, in this case: nginx. If Nginx is actually running, the output will include a master and one or more worker processes. If these are present in your output, then you can conclude that NginX is installed and running properly. Suppose you were to update
NginX and you decide you want to go back. Unfortunately, the answer isn’t necessarily as simple as throwing out a command. Your distro is incentivized to only provide the latest versions of software that will work well together. So, if the NginX version you want is older, it may not be offered. In this instance, you may have to configure it yourself or find the package and install it manually. This often is not advisable, though. Hopefully,
this has helped you to understand the basics for determining and troubleshooting your NginX version. It’s pretty straightforward, and can be accomplished in just a minute or two. However, chances are, you’re probably looking for your NginX version in order to sort out a larger issue. If this is the case, consider working with us. We have decades of experience working with web servers and we can help solve your problems.How to Find NginX Version In 2 Quick Steps
So, How Do I Find My NginX Version?
Method 1: nginx -v
nginx version: nginx/1.10.0
Method 2: nginx -V
nginx version: nginx/1.12.0
built with OpenSSL 1.2.0g 8 Dec 2019
TLS SNI support enabledMethod 3: Wrong file request
Verify that NginX is Installed and Running
How do I install an older version of NginX?
Conclusions: Finding Your NginX Version
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
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
fails with the 'command not found
error
I verified that nginx exists in the usr/sbin directory and that directory is added to the $PATH variable
asked Dec 9, 2015 at 19:17
user_mdauser_mda
16.9k23 gold badges75 silver badges132 bronze badges
5
It seems that your nginx hasn't been installed correctly. Pay attention to the output of the installation commands:
sudo apt-get install 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
For more information: //nginxlibrary.com/check-nginx-version/
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.
answered Jun 12, 2016 at 11:21
hassan ketabihassan ketabi
2,6312 gold badges20 silver badges30 bronze badges
In my case, I try to add sudo
sudo nginx -v
answered Jul 16, 2017 at 17:12
Frank NguyenFrank Nguyen
6,3833 gold badges37 silver badges37 bronze badges
1
If you don't know where it is, locate nginx first.
ps -ef | grep nginx
Then you will see something like this:
root 4801 1 0 May23 ? 00:00:00 nginx: master process /opt/nginx/sbin/nginx -c /opt/nginx/conf/nginx.conf
root 12427 11747 0 03:53 pts/1 00:00:00 grep --color=auto nginx
nginx 24012 4801 0 02:30 ? 00:00:00 nginx: worker process
nginx 24013 4801 0 02:30 ? 00:00:00 nginx: worker process
So now you already know where nginx is. You can use the -v or -V. Something like:
/opt/nginx/sbin/nginx -v
answered May 24, 2018 at 4:01
My guess is it's not in your path.
in bash, try:
echo $PATH
and
sudo which nginx
And see if the folder containing nginx is also in your $PATH variable.
If not, either add the folder to your path environment variable, or create an alias [and put it in your .bashrc] ooor your could create a link i guess.
or sudo nginx -v
if you just want that...
answered Aug 14, 2017 at 22:51
xorxor
712 silver badges4 bronze badges
Make sure that you have permissions to run the following commands.
If you check the man page of nginx from a terminal
man nginx
you can find this:
-V Print the nginx version, compiler version, and configure script parameters.
-v Print the nginx version.
Then type in terminal
nginx -v
nginx version: nginx/1.14.0
nginx -V
nginx version: nginx/1.14.0
built with OpenSSL 1.1.0g 2 Nov 2017
TLS SNI support enabled
If nginx is not installed in your system man nginx
command can not find man page, so make sure you have installed nginx.
You can also find the version using this command:
Use one of the command to find the path of nginx
ps aux | grep nginx
ps -ef | grep nginx
root 883 0.0 0.3 44524 3388 ? Ss Dec07 0:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on
Then run from terminal:
/usr/sbin/nginx -v
nginx version: nginx/1.14.0
answered Dec 8, 2018 at 0:35
bhordupurbhordupur
75210 silver badges13 bronze badges
Try running command whereis nginx
. It will give you the correct path of the nginx installation, in my case nginx is installed in /usr/local/sbin
, so I need to check if this path exists in output of command echo $PATH
.
If you don't find the path in the output of this command, then you can add this.
Suppose the output of my echo $PATH
command is this:
~$ echo $PATH
/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/nginx/sbin
Then I can append the path /usr/local/sbin
in $PATH by following command:
~$ echo 'export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/nginx/sbin"' >> $HOME/.bashrc
Please check your nginx installation path may differ from mine, but the steps for adding them are same.
Zap
3251 gold badge6 silver badges22 bronze badges
answered Oct 26, 2017 at 5:16
search if iginx is installed or any package in your system
which nginx
OR
sudo which nginx
if previously nginx installed result will be like this /sbin/nginx /bin/nginx
if you use rhel, it will show you all installed modules
yum search nginx
OR check nginx version in rhel
rpm -q nginx
Result look like this
nginx-1.14.1-9.module+el8.0.0+4108+af250afe.x86_64
OR
sudo nginx -v
Result look like
nginx version: nginx/1.14.1
don't use "nginx --version" it will show unexpected errors. I'm a RHEL user.
1