IP被封403_CDN WAF与源站403区分
景安虚拟主机做 IP被封403,Nginx 的 403 常见原因是目录下没有 index 文件且 autoindex off(目录浏览关闭),访问目录时 Nginx 找不到默认首页就返回 403。上传 index.html/index.php 或开启 autoindex 即可。Apache 的 403 常见是 Options -Indexes 或权限问题。
权限排查:Linux 用 ls -la 看文件权限和属主,目录应该 755(drwxr-xr-x)、文件 644(-rw-r--r--)、属主是 www 或 nginx 或 apache。权限不对用 chmod -R 755 目录和 find 目录 -type f -exec chmod 644 {} ;,属主不对用 chown -R www:www 目录。Windows IIS 检查 IUSR 和 IIS_IUSRS 是否有读取权限。
参考(Nginx 403配置示例): ``` # 默认首页 server { listen 80; server_name 域名; root /www/wwwroot/域名; index index.html index.htm index.php;
# 禁止访问特定目录 location ~* /(admin|install)/ { # deny all; # 注释掉测试 allow 你的IP; deny all; }
# PHP处理 location ~ .php$ { fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_index index.php; include fastcgi.conf; } }
# SELinux上下文(CentOS) chcon -R -t httpd_sys_content_t /www/wwwroot/域名 chcon -R -t httpd_sys_rw_content_t /www/wwwroot/域名/upload ```
403 和 SEO 的关系:403 页面百度蜘蛛抓取失败,持续 403 会导致收录下降、排名掉。整站 403 要立即修复,部分页面 403 检查是否是误封。robots.txt 不要禁止正常页面,403 和 robots 禁止是两回事,403 是服务器拒绝,robots 是告诉蜘蛛不要抓。
Apache 403 专项:Apache 错误日志在 /var/log/httpd/error_log 或 /var/log/apache2/error.log,常见 "client denied by server configuration"(deny 规则或 Options)、"Permission denied"(文件系统权限)。.htaccess 语法错误会导致 500 不是 403,注意区分。

更新时间:2026-08-26 21:19:18
上一篇:360安全浏览器提示网站存在风险解除_清理方法_长效防护