找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 2214|回复: 3

[N1盒子] docker 装 nginx+naxsi web waf防火墙 捍卫网站安全 不断扩展中

[复制链接]
本帖最后由 dgiuobin 于 2018-10-27 13:31 编辑

naxsi 已经集成再 nginx 里面。附下载:链接: https://pan.baidu.com/s/1qqlDbwNAjQZKq77xv3DTTg 提取码: mucv

卷说明:
"/etc/nginx/conf.d" \    -----  nginx配置目录
"/etc/nginx/naxsi" \    -----  naxsi规则目录
"/etc/nginx/ssl" \   -----  SSL证书目录
"/usr/share/nginx/html" \   -----  网站根目录
"/var/log/nginx"   -----  日志


typecho.conf 样板:
  1. server {
  2.     listen       80;
  3.     server_name  localhost;
  4.     include        /etc/nginx/naxsi/mian-rules/*.rulse;

  5.     #charset koi8-r;
  6.     #access_log  /var/log/nginx/log/host.access.log  main;

  7.     location / {
  8.         root   /usr/share/nginx/html;
  9.         index  index.html index.htm index.php;
  10.          include        /etc/nginx/naxsi/doxi-rules/*.rules;  
  11.           include        /etc/nginx/naxsi/whitelists/*.wl;
  12.          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;


  13.      #Typecho Nginx rewrite
  14.     if (-f $request_filename/index.html){
  15.         rewrite (.*) $1/index.html break;
  16.     }
  17.     if (-f $request_filename/index.php){
  18.         rewrite (.*) $1/index.php;
  19.     }
  20.     if (!-f $request_filename){
  21.         rewrite (.*) /index.php;
  22.     }

  23.     }
  24.      


  25.     #error_page  404              /404.html;

  26.     # redirect server error pages to the static page /50x.html
  27.     #
  28.     error_page   500 502 503 504  /50x.html;
  29.     location = /50x.html {
  30.         root   /usr/share/nginx/html;
  31.     }

  32.     # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  33.     #
  34.     #location ~ \.php$ {
  35.     #    proxy_pass   http://127.0.0.1;
  36.     #}

  37.     # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  38.     #
  39.     location ~ \.php$ {
  40.         root           html;
  41.         fastcgi_pass   172.17.0.4:9000;
  42.         fastcgi_index  index.php;
  43.         fastcgi_param  SCRIPT_FILENAME  /var/www/html$fastcgi_script_name;
  44.         include        fastcgi_params;
  45.     }

  46.     # deny access to .htaccess files, if Apache's document root
  47.     # concurs with nginx's one
  48.     #
  49.     #location ~ /\.ht {
  50.     #    deny  all;
  51.     #}
  52. }

复制代码


我的恩山、我的无线 The best wifi forum is right here.
二楼?  字数补丁
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

观看中...............
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
更新教程中。。。。。。。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

欢迎大家光临恩山无线论坛上一条 /1 下一条

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-29 09:47

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表