宝塔面板反向代理nginx配置里可删除/注释的内容

0
11

### 宝塔面板反向代理nginx配置里可删除/注释的内容(与纯反代无关)

页面相关的

index index.php index.html index.htm default.php default.htm default.html;
root /data/web/html/www.a.com;

PHP 和伪静态

include enable-php-00.conf;
include /www/server/panel/vhost/rewrite/www.a.com.conf;

purge 缓存(你未设置缓存可删)

location ~ /purge(/.*) {
    proxy_cache_purge cache_one $host$1$is_args$args;
}

错误页页面

error_page 404 /404.html;
#error_page 502 /502.html;

文件屏蔽(非必须,除非你担心安全)

location ~ ^/(\.user.ini|\.htaccess|\.git|\.env|\.svn|\.project|LICENSE|README.md)
{
    return 404;
}

.well-known 目录(保留也行,一般用于 SSL 验证)

include /www/server/panel/vhost/nginx/well-known/emby.qjfyx.com.conf;
location ~ \.well-known {
    allow all;
}

发布回复

请输入评论!
请输入你的名字