看不懂 这个nginx配置 哪里出了问题 deny不生效

89次阅读

共计 579 个字符,预计需要花费 2 分钟才能阅读完成。

看不懂 这个 nginx 配置 哪里出了问题 deny 不生效

  1. server {
  2.     listen 80;
  3.     server_name test.xxx.info;
  4.     #access_log  /var/log/nginx/host.access.log  main;
  5.     location / {
  6.         root   /usr/share/nginx/html;
  7.         index  index.html index.htm;
  8.     }
  9.     #error_page  404              /404.html;
  10.     # redirect server error pages to the static page /50x.html
  11.     #
  12.     error_page   500 502 503 504  /50x.html;
  13.     location = /50x.html {
  14.         root   /usr/share/nginx/html;
  15.     }
  16.     # deny access to .htaccess files, if Apache’s document root
  17.     # concurs with nginx’s one
  18.     #
  19.     location ~ /.ht {
  20.         allow all;
  21.         deny 117.141.145.100;
  22.     }
  23. }

复制代码

网友回复:

注册 deny 放 allow 上面试试

j6hokqgfrr 试了 不行 不知哪里出问题了

正文完
 0