网站只能ctrl+shift+f5才能看到最新内容 并且正常刷新后看到的又是之前的内容 这样可能是什么原因造成?
nginx配置如下
server {
listen 443 ssl;
server_name iroboup.com www.iroboup.com;
root /home/ubuntu/data/html/online/public;
index index.html index.htm index.php;
ssl_certificate /etc/nginx/cert/www.iroboup.com.pem;
ssl_certificate_key /etc/nginx/cert/www.iroboup.com.key;
#add_header X-Frame-Options "SAMEORIGIN";
#add_header X-XSS-Protection "1; mode=block";
#add_header X-Content-Type-Options "nosniff";
client_max_body_size 200m;
charset utf-8;
# 这是laravel的规则
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico {
access_log off;
log_not_found off;
}
location = /robots.txt {
access_log off;
log_not_found off;
}
location ~ .php$ {
try_files $uri =404;
root /home/ubuntu/data/html/online/public;
fastcgi_pass unix:/run/php/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi.conf;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
相同项目,相同代码,我使用http可正常访问 正常更新;使用https就看到的是第一次访问页面看到的内容
用抓包工具抓包看看内容
嵌套网站吗?nginx add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0"; add_header Expires "Mon, 3 Jan 2000 12:00:00 GMT"; add_header Pragma "no-cache"; 加一下这个了不要缓存试试
server { listen 443 ssl; server_name iroboup.com www.iroboup.com; root /home/ubuntu/data/html/online/public; index index.html index.htm index.php; ssl_certificate /etc/nginx/cert/www.iroboup.com.pem; ssl_certificate_key /etc/nginx/cert/www.iroboup.com.key;
} 这个改一下