国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統(tǒng) > Linux > 正文

linux中更改Nginx For Tcp_wrappers返回444

2024-08-27 23:55:31
字體:
供稿:網(wǎng)友
  前幾天通過Tcp_wrappers阻止一些分析出來的惡意IP效果還是有的…不過我后面仍發(fā)現(xiàn)會(huì)占用一些流量,故此我想通過返回444這種非標(biāo)準(zhǔn)的狀態(tài)碼,減小流量的使用.
 
  默認(rèn)情況下開啟模塊僅會(huì)返回403,代碼如下:
 
  [root@ipython conf]# curl -I http://www.phpfensi.com
 
  HTTP/1.1 403 Forbidden
 
  Server: nginx/1.6.1
 
  Date: Fri, 15 Aug 2014 14:52:13 GMT

  那么操作起來很簡單了,修改源代碼即可,我重新打包后的文件會(huì)附在本文末尾附件下載,修改方式很簡單,return 對應(yīng)的狀態(tài)碼即可,代碼如下:
 
  ###重新編譯Nginx###
 
  [root@ipython nginx-1.6.1]# ./configure --prefix=/software/nginx --user=nginx --group=nginx --with-http_stub_status_module --with-http_ssl_module --with-http_realip_module --with-http_gzip_static_module --with-google_perftools_module --with-debug --http-client-body-temp-path=/var/tmp/nginx/client --http-proxy-temp-path=/var/tmp/nginx/proxy --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi --http-scgi-temp-path=/var/tmp/nginx/scgi --with-pcre=/root/pcre-8.35 --with-openssl=/root/openssl-1.0.1i --with-zlib=/root/zlib-1.2.8 --add-module=./ngx_tcpwrappers
 
  ###具體操作參考前文###
 
  [root@ipython nginx-1.6.1]# cp objs/nginx /software/nginx/sbin/
 
  [root@ipython nginx-1.6.1]# make upgrade。
 

(編輯:武林網(wǎng))

發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 新密市| 社会| 眉山市| 五大连池市| 东乌| 玉溪市| 兰州市| 木里| 华安县| 元阳县| 岳西县| 平利县| 聂拉木县| 综艺| 将乐县| 临邑县| 瑞昌市| 遂溪县| 绵竹市| 延吉市| 泰顺县| 阿巴嘎旗| 久治县| 祁门县| 那坡县| 综艺| 延边| 广平县| 广丰县| 荔浦县| 玉田县| 偃师市| 湘阴县| 汝阳县| 凤阳县| 延庆县| 泰和县| 宜阳县| 南城县| 渝北区| 宜昌市|