网友 whl32 说:
Discuz站点,前端自建nginx CDN节点,遇到问题是登录等*作后页面不会立即生效,比如登录提示成功后到首页显示未登录,按F5刷新后才显示登录的用户**。
nginx配置如下
- p**xy_cache_path /home/www**ot/bbs.Discuz.net l***ls=1:2 keys_zone=Discuz:50m inactive=30m max_size=50m;
- ****** {
- listen 80;
- ******_name bbs.Discuz.net;
- acce**_log off;
- #charset utf-8,gbk;
- if ($re*uest_**i ~ ^/(index.html|login|register|pa**word|\/reset)) {
- set $cookie_nocache 1;
- }
- location / {
- p**xy_set_header Accept-Encoding &*uot;&*uot;;
- p**xy_pa** http://bbs.Discuz.net;
- p**xy_redirect off;
- p**xy_set_header X-Real-IP $remote_addr;
- p**xy_set_header X-Forwarded-For $p**xy_add_x_forwarded_for;
- p**xy_cache Discuz;
- p**xy_cache_key $host$**i$is_args$args;
- p**xy_no_cache $cookie_nocache $arg_nocache $arg_comment;
- p**xy_no_cache $http_pra**a $http_**tho**zation;
- add_header Nginx-Cache &*uot;$upstream_cache_status&*uot;;
- p**xy_cache_valid 200 304 30m;
- p**xy_cache_valid 301 24h;
- p**xy_cache_valid 500 502 503 504 0s;
- p**xy_cache_valid any 1s;
- p**xy_cache_min_uses 1;
- expires 12h;
- }
- }
网友 1121744186 说:
前端不是 ajax 分离的 动态页面 不能加 缓存
未经允许不得转载:爱主机 » nginx cdn Discuz刷新问题