Nginx can not only hide version information, but also support custom web server information Let’s take a look at the final hidden results first. How to implement it specifically? It is actually very simple. Please read on. 1 Download the latest stable version from the official website wget http://nginx.org/download/nginx-1.14.1.tar.gz 2 Unzip tar -xf nginx-1.14.1.tar.gzcd nginx-1.14.1 3 Modify the C file
4 Compilation Configuration ./configure --prefix=/usr/local/nginx 5 Compile and install make && make install 6 Modify the nginx configuration file and add server_tokens off under the http node vim /usr/local/nginx/conf/nginx.conf .... http { server_tokens off; ..... 7 Start nginx /usr/local/nginx/sbin/nginx 8 Testing [root@node1 nginx-1.14.1]# curl -I http://127.0.0.1 HTTP/1.1 200 OK Server: Please guess it! Date: Wed, 07 Nov 2018 19:15:43 GMT ...... Browser access test illustrate: (1) If you only want to hide the version number and do not want to customize the server information, you do not need to perform step 3. (2) If you want to customize the string while upgrading nginx, there is no problem. You can modify the C file first --> ./configure --> make Summarize The above is the solution to hide the version number and WEB server information of nginx 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:
|
<<: Solve the MySQL 5.7.9 version sql_mode=only_full_group_by problem
>>: Implementing Binary Search Tree in JavaScript
Two implementations of Vue drop-down list The fir...
If you want to install multiple tomcats, you must...
I encountered a problem today. When entering the ...
1. Best left prefix principle - If multiple colum...
Table of contents Preface Understanding a stack a...
Table of contents 1. Implement the $(".box1&...
<br />Related articles: How to prompt and op...
Table of contents Introduction to Arrays Array li...
Table of contents Problem 1: Destruction 1. How t...
Putting input and img on the same line, the img ta...
To split a string into an array, you need to use ...
Table of contents Preface Target first step: Step...
As users become more privacy-conscious and take m...
Recently, I have been working on several virtual ...
Table of contents Horizontal bar chart Dynamicall...