vps交流

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


看不懂 这个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上面试试

Laa 发表于 2022-6-13 23:45
deny放allow上面试试

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

赞(0)
版权声明:本贴采用知识共享 署名4.0国际许可协议 [BY-NC-SA] 进行授权
帖子名称:《[疑问] 看不懂 这个nginx配置 哪里出了问题 deny不生效》
帖子链接:https://bbs.toot.su/130028.html

相关推荐