How does Linux view nginx version?

2023-12-19 14:54:56

<p><br/></p><p>1. Check the version number of nginx installed on the server, mainly through the -v or -V option of nginx, as shown in the following figure.</p><p>-v shows the version of nginx.</p><p>-V displays the version, compiler version and configuration parameters of nginx.</p><p>[root@zq ~]# nginx -V</p><p>nginx version: nginx/1.16.1</p><p>built by gcc 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC)</p><p>built with OpenSSL 1.0.2k-fips 26 Jan 2017</p><p>TLS SNI support enabled</p><p>configure arguments: &amp;ndash; prefix=/etc/nginx &amp;ndash; sbin-path=/usr/sbin/nginx &amp;ndash; modules-path=/usr/lib64/nginx/modules &amp;ndash; conf-path=/etc/nginx/nginx.conf &amp;ndash; error-log-path=/var/log/nginx/error.log &amp;ndash; http-log-path=/var/log/nginx/access.log &amp;ndash; pid-path=/var/run/nginx.pid &amp;ndash; lock-path=/var/run/nginx.lock &amp;ndash; http-client-body-temp-path=/var/cache/nginx/client_temp &amp;ndash; http-proxy-temp-path=/var/cache/nginx/proxy_temp &amp;ndash; http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp &amp;ndash; http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp &amp;ndash; http-scgi-temp-path=/var/cache/nginx/scgi_temp &amp;ndash; user=nginx &amp;ndash; group=nginx &amp;ndash; with-compat &amp;ndash; with-file-aio &amp;ndash; with-threads &amp;ndash; with-http_addition_module &amp;ndash; with-http_auth_request_module &amp;ndash; with-http_dav_module &amp;ndash; with-http_flv_module &amp;ndash; with-http_gunzip_module &amp;ndash; with-http_gzip_static_module &amp;ndash; with-http_mp4_module &amp;ndash; with-http_random_index_module &amp;ndash; with-http_realip_module &amp;ndash; with-http_secure_link_module &amp;ndash; with-http_slice_module &amp;ndash; with-http_ssl_module &amp;ndash; with-http_stub_status_module &amp;ndash; with-http_sub_module &amp;ndash; with-http_v2_module &amp;ndash; with-mail &amp;ndash; with-mail_ssl_module &amp;ndash; with-stream &amp;ndash; with-stream_realip_module &amp;ndash; with-stream_ssl_module &amp;ndash; with-stream_ssl_preread_module &amp;ndash; with-cc-opt=&amp;rsquo; -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong &amp;ndash; param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC&amp;rsquo; &nbsp;&amp;ndash; with-ld-opt=&amp;rsquo; -Wl,-z,relro -Wl,-z,now -pie&amp;rsquo;</p><p>2. use rpm -qa | grep nginx to view the version of nginx.</p><p>[root@zq ~]# rpm -qa | grep nginx</p><p>nginx-1.16.1-1.el7.ngx.x86_64</p><p>3. Use curl -i 127.0.0.1.</p><p>[root@zq ~]# curl -i 127.0.0.1</p><p>HTTP/1.1 200 OK</p><p>Server: nginx/1.16.1</p><p>Date: Thu, 20 Feb 2020 01:56:15 GMT</p><p>Content-Type: text/html</p><p>Content-Length: 612</p><p>Last-Modified: Tue, 13 Aug 2019 15:04:31 GMT</p><p>Connection: keep-alive</p><p>ETag: 5d52d17f-264</p><p>Accept-Ranges: bytes</p><p>Welcome to nginx!</p><p>body {</p><p>width: 35em;</p><p>margin: 0 auto;</p><p>font-family: Tahoma, Verdana, Arial, sans-serif;</p><p>}</p><p>Welcome to nginx!</p><p>working. Further configuration is required.</p><p>Commercial support is available at</p>


Copyright Description:No reproduction without permission。

Knowledge sharing community for developers。

Let more developers benefit from it。

Help developers share knowledge through the Internet。

Follow us