Nginx隱藏和偽造版本號(hào)

發(fā)布時(shí)間:2024-03-12
系統(tǒng)運(yùn)維
1、默認(rèn)使用curl命令訪問(wèn):
# curl -i http://172.17.0.5
2、修改nginx.conf配置文件,在http配置段中新增如下代碼:
# vim /usr/local/nginx/conf/nginx.conf
server_tokens off;
3、修改fastcgi.conf配置文件,注釋如下代碼:
# vim /usr/local/nginx/conf/fastcgi.conf
fastcgi_param? server_software? nginx/$nginx_version;
4、重載nginx:
# nginx -s reload
5、使用curl命令訪問(wèn):
# curl -i http://172.17.0.5
6、偽造nginx的名稱和版本號(hào):
# vim /usr/src/nginx-1.16.1/src/core/nginx.h,修改如下代碼
#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,刪除之前新增的代碼:server_tonkens off;
# nginx -s stop
# nginx
7、使用curl命令訪問(wèn):
# curl -i http://172.17.0.5
上一個(gè):版權(quán)的產(chǎn)生原則是怎樣的
下一個(gè):喝茶時(shí),該注意些什么?

聯(lián)想回收二手電腦嗎,聯(lián)想筆記本二手電腦回收價(jià)格
mate8鎖屏?xí)r間怎么調(diào),華為mate8怎么調(diào)時(shí)間
快溫變恒溫恒濕試驗(yàn)箱針對(duì)不業(yè)的測(cè)試標(biāo)準(zhǔn)參考
手機(jī)可以上網(wǎng)電腦上不去怎么回事(手機(jī)能上網(wǎng),電腦不能上網(wǎng)怎么辦)
六盤(pán)山國(guó)家森林公園里面有什么服務(wù)設(shè)施
混凝土結(jié)構(gòu)工程實(shí)測(cè)實(shí)量施工控制線設(shè)置一般規(guī)定有哪些?
nova9se價(jià)格(nova9se新消息)
網(wǎng)站登陸后顯示此問(wèn)題請(qǐng)盡快解決
無(wú)線鍵盤(pán)鼠標(biāo)鼠標(biāo)沒(méi)反應(yīng)鍵盤(pán)沒(méi)問(wèn)題(電腦無(wú)線鍵鼠鍵盤(pán)沒(méi)反應(yīng)怎么回事)
兩個(gè)分區(qū)合并成一個(gè),分區(qū)怎么合并成一個(gè)
十八禁 网站在线观看免费视频_2020av天堂网_一 级 黄 色 片免费网站_绝顶高潮合集Videos