How to check Nginx version?

Published on


If we’ve installed Nginx and wanted to know what version of Nginx is installed in the system, then it is simple to retrieve the version of Nginx by calling the Nginx binary with a command-line parameter.


Nginx Version Check

Just log in to the terminal window or ssh to the server. Then we can use the command nginx -v to check the Nginx version.

To know a few more information like installed modules’ details use parameter -V which will output the Nginx version with the compiler version and configuration parameters.

You can use this command to almost all the Linux distros or flavors like Debian, Ubuntu, CentOS and more. If you’re are Windows OS user, then you can know the nginx version from the folder name.

The Output of NGINX -v and NGINX -V

Parameters like – small v show the Nginx version only, whereas a capital V outputs much more information to use.

$ nginx -v
nginx version: nginx/1.10.3
$ nginx -V
nginx version: nginx/1.10.3
built with OpenSSL 1.1.0f  25 May 2017
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fdebug-prefix-map=/build/nginx-2tpxfc/nginx-1.10.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-z,relro -Wl,-z,now' --prefix=/usr/share/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/ --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_sub_module --with-http_xslt_module=dynamic --with-stream=dynamic --with-stream_ssl_module --with-mail=dynamic --with-mail_ssl_module --add-dynamic-module=/build/nginx-2tpxfc/nginx-1.10.3/debian/modules/nginx-auth-pam --add-dynamic-module=/build/nginx-2tpxfc/nginx-1.10.3/debian/modules/nginx-dav-ext-module --add-dynamic-module=/build/nginx-2tpxfc/nginx-1.10.3/debian/modules/nginx-echo --add-dynamic-module=/build/nginx-2tpxfc/nginx-1.10.3/debian/modules/nginx-upstream-fair --add-dynamic-module=/build/nginx-2tpxfc/nginx-1.10.3/debian/modules/ngx_http_substitutions_filter_module

Another Option to Check NGINX Version

If there is no access to the ssh server or terminal then simply make a wrong file request, the server itself gives 404 error and there it will show the Nginx version. It will only work if the Nginx web server is configured in default settings.

NGINX - 404 Not Found

Example of an error file request –

This is how we can check the Nginx version.

Published in: .

Leave a Reply

Your email address will not be published. Required fields are marked *