1. Use curl command to access by default: 2. Modify the nginx.conf configuration file and add the following code in the http configuration section: # vim /usr/local/nginx/conf/nginx.conf server_tokens off; 3. Modify the fastcgi.conf configuration file and comment the following code: # vim /usr/local/nginx/conf/fastcgi.conf fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; 4. Reload Nginx: 5. Use curl command to access: 6. Forge the name and version number of Nginx: # vim /usr/src/nginx-1.16.1/src/core/nginx.h, modify the following code #define NGINX_VERSION "1.16.1" --> #define NGINX_VERSION "2.3.2" #define NGINX_VER "nginx/" NGINX_VERSION --> #define NGINX_VER "Tengine/" NGINX_VERSION # cd /usr/src/nginx-1.16.1 # ./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-threads --with-file-aio --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_image_filter_module --with-http_geoip_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-http_perl_module --with-mail --with-mail_ssl_module --with-stream --with-stream_ssl_module --with-stream_realip_module --with-stream_geoip_module --with-stream_ssl_preread_module --with-compat --with-pcre # make && make install # cd /usr/local/nginx/conf # vim nginx.conf, delete the previously added code: server_tonkens off; # nginx -s stop # nginx 7. Use curl command to access: Summarize The above is the operation method of hiding and forging Nginx version number introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Detailed explanation of the basic usage of the auxiliary function mapGetters in vuex
>>: Solve MySQL deadlock routine by updating different indexes
Preface This article introduces a simple BAT scri...
Regarding how to create this thin-line table, a s...
Glass Windows What we are going to achieve today ...
First of all, for security reasons, JavaScript ca...
Table of contents 1. What is Docker Compose and h...
Table of contents Step 1: Installation Step 2: Ci...
Introduction to structural pseudo-class selectors...
Personal implementation screenshots: Install: npm...
Method 1: Set the readonly attribute to true. INPU...
When I was studying CSS recently, I found that I ...
1. Install Baidu Eslint Rule plugin npm i -D esli...
Table of contents 1. Background 2. Table creation...
Because of network isolation, MySQL cannot be ins...
Table of contents 1. DOM & BOM related 1. Che...
Use Javascript to implement a drop-down menu for ...