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
This article mainly introduces how to evenly dist...
I just learned mybatis today and did some simple ...
Forgetting the password is a headache. What shoul...
1. Grammar location [=|~|~*|^~|@] /uri/ { ... } 2...
This article shares the installation and configur...
Table of contents introduction 1. Case Overview 2...
This article records the detailed installation tu...
Table of contents Writing Background Project Desc...
Preface: Sometimes, the session connected to MySQ...
Q: I don’t know what is the difference between xml...
1. Get the mysql image docker pull mysql:5.6 Note...
This article mainly introduces the relevant solut...
Table of contents 1. Basic Example 2. Set the sco...
template <el-table :data="dataList"&...
Table of contents Master-slave replication mechan...