Nginx upgrade version or re-compile to add Parameters
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/47/84/wKiom1P792Si1_D1AAF2hQF44Rc626.jpg "style =" float: none; "Title =" 111.png" alt = "wkiom1p792si1_d1aaf2h1_44rc626.jpg"/>
Here we recompile and add nginx users and groups.
Create a user first
# Useradd nginx
Start Compilation
# Cd/usr/local/nginx-1.6.1
#. /Configure -- user = nginx -- group = nginx -- prefix =/usr/local/nginx -- with-http_ssl_module -- with-http_stub_status_module -- with-http_gzip_static_module -- http-proxy-temp-Path =/var/tmp/nginx /Proxy/-- http-FastCGI-temp-Path =/var/tmp/nginx/fcgi/-- With-PCRE
Make first and do not make install
# Make
Back up
# Mv/usr/local/nginx/sbin/nginx. Old
# Cp objs/nginx/usr/local/nginx/sbin/nginx
Test OK. Continue
#/Usr/local/nginx/sbin/nginx-T
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/47/86/wKioL1P7-HuwihuhAADgByc-blY039.jpg "Title =" 222.png" style = "float: none;" alt = "wKioL1P7-HuwihuhAADgByc-blY039.jpg"/>
Start upgrade
# Make upgrade
After compilation, check the compilation parameters and add nginx users.
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/47/84/wKiom1P792SwXdMeAAGH4NHCG2w281.jpg "Title =" 33.png" style = "float: none;" alt = "wkiom1p792swxdmeaagh4nhcg2w281.jpg"/>
Hide nginx version information, which is visible to me by default.
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/47/86/wKioL1P7-yGxzNVuAAEE6C1IovI568.jpg "Title =" 444.png" style = "float: none;" alt = "wKioL1P7-yGxzNVuAAEE6C1IovI568.jpg"/>
You only need to add server_tokens off to the configuration file. Let's take a look at the restart.
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/47/84/wKiom1P7-gqCMVwgAAIUA9TBueM250.jpg "Title =" 666.png" style = "float: none;" alt = "wKiom1P7-gqCMVwgAAIUA9TBueM250.jpg"/>
Now we can see that the version information is no longer available.
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/47/84/wKiom1P7-gnSOfJPAAEdeYEAgyY846.jpg "Title =" 555.png" style = "float: none;" alt = "wKiom1P7-gnSOfJPAAEdeYEAgyY846.jpg"/>
This article is from the "change from now on" blog, please be sure to keep this source http://peaceweb.blog.51cto.com/3226037/1545058
Nginx upgrade version or re-compile to add Parameters