[quote]问题描述:nginx配置了 禁用目录浏览无法生效。server { listen 109; server_name 192.168.1.11; index index.php index.html index.htm default.php default.htm default.html; root /www/wwwroot/xxx.com/api; include /www/server/panel/vhost/nginx/well-known/xxx.com.conf; autoindex off; # 禁用目录浏览 location ~ /purge(/.*) { proxy_cache_purge cache_one $host$1$is_args$args; } #引用反向代理规则,注释后配置的反向代理将无效 include /www/server/panel/vhost/nginx/proxy/xxx.com/*.conf; include enable-php-00.conf; #PHP-INFO-END #REWRITE-START URL重写规则引用,修改后将导致面板设置的伪静态规则失效 include /www/server/panel/vhost/rewrite/xxx.conf; #REWRITE-END #禁止访问的文件或目录 location ~ ^/(\.user.ini|\.htaccess|\.git|\.env|\.svn|\.project|LICENSE|README.md) { return 404; } #一键申请SSL证书验证目录相关设置 location ~ \.well-known{ allow all; } #禁止在证书验证目录放入敏感文件 if ( $uri ~ "^/\.well-known/.*\.(php|jsp|py|js|css|lua|ts|go|zip|tar\.gz|rar|7z|sql|bak)$" ) { return 403; } access_log /www/wwwlogs/xxx.com.log; error_log /www/wwwlogs/xxx.com.error.log; } 禁用了,配置无法生效。求助大佬帮忙解答一下
|
|