Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

常见问题

aimerforreimu edited this page Mar 17, 2019 · 1 revision

1.配置无法修改,无法登出

请检查您的 nginx 反代配置,如果您使用的是宝塔,请删掉proxy_cache部分的配置,因为程序并没有做相应的缓存适配,再就是因为程序的特殊性,目前并不需要反代缓存

这里贴一下我自己的配置

server
{
 listen 80;
 listen 443 ssl http2;
 server_name yoursite.com;
 index index.php index.html index.htm default.php default.htm default.html;
 root /www/wwwroot/imgx_0w0_tn;
 
 #SSL-START SSL相关配置,请勿删除或修改下一行带注释的404规则
 #error_page 404/404.html;
 #HTTP_TO_HTTPS_START
 if ($server_port !~ 443){
 rewrite ^(/.*)$ https://$host1ドル permanent;
 }
 #HTTP_TO_HTTPS_END
 ssl_certificate /etc/letsencrypt/live/yoursite.com/fullchain.pem;
 ssl_certificate_key /etc/letsencrypt/live/yoursite.com/privkey.pem;
 ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
 ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
 ssl_prefer_server_ciphers on;
 ssl_session_cache shared:SSL:10m;
 ssl_session_timeout 10m;
 error_page 497 https://$host$request_uri;
 #SSL-END
 
 #ERROR-PAGE-START 错误页配置,可以注释、删除或修改
 error_page 404 /404.html;
 error_page 502 /502.html;
 #ERROR-PAGE-END
 
 location / 
 {
 proxy_pass http://xxx.xxx.xxx.xxx:2333;
 proxy_set_header Host $host;
 proxy_set_header X-Real-IP $remote_addr;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 proxy_set_header REMOTE-HOST $remote_addr;
 
 }
 
 #禁止访问的文件或目录
 location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)
 {
 return 404;
 }
 
 #一键申请SSL证书验证目录相关设置
 location ~ \.well-known{
 allow all;
 } 
}

您可以将您的宝塔配置,修改为和我的配置一样,这样就不会出现缓存导致各种修改无法生效的问题

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /