VPS侦探论坛

 找回密码
 注册
查看: 5751|回复: 6

为什么安装1.2以后页面被缓存

[复制链接]
发表于 2015-10-18 16:45:06 | 显示全部楼层 |阅读模式

1.2安装完毕后,修改项目中的页面,但发现应该是被缓存了,研究了很久没有办法解决,请问是nginx的缓存吗?
nginx配置如下:
server
    {
        listen 80;
        #listen [::]:80;
        server_name xxx;
        index index.html index.htm index.php default.html default.htm default.php;
        root  /home/wwwroot/default;

        include none.conf;
        #error_page   404   /404.html;
        location ~ [^/].php(/|$)
        {
            # comment try_files $uri =404; to enable pathinfo
            try_files $uri =404;
            fastcgi_pass  unix:/tmp/php-cgi.sock;
            fastcgi_index index.php;
            include fastcgi.conf;
            #include pathinfo.conf;
        }

        location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires      30d;
        }

        location ~ .*.(js|css)?$
        {
            expires      12h;
        }

        access_log  /home/wwwlogs/cpu.m370.net.log  access;
    }
安装版本:LNMP1.2
没有安装任何缓存软件

[ 本帖最后由 smj227227 于 2015-10-18 16:50 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2015-10-18 19:58:05 | 显示全部楼层


1.2,php 5.5以上版本默认有opcache
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2015-10-19 10:51:26 | 显示全部楼层

回复 2# 的帖子


但是并没有开启opcache啊,而且除非是重加载页面,否则F5刷新修改是无效的...
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2015-10-19 13:15:37 | 显示全部楼层



同问如何关闭
关注
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2015-10-19 17:06:49 | 显示全部楼层

1.2,php 5.5以上版本默认有opcache
编辑/usr/local/php/etc/php.ini 查找Zend Opcache,将下面opcache. 开头的哪些行全部删除或注释掉


sed -i '/\[Zend Opcache\]/,/opcache.enable_cli/d' /usr/local/php/etc/php.ini

重启php-fpm

军哥运维代购:http://shop63846532.taobao.com/

发表于 2015-10-19 21:38:59 | 显示全部楼层

谢谢军哥
这个opcache在开发阶段很蛋疼
 楼主| 发表于 2015-10-20 22:45:02 | 显示全部楼层

回复 5# 的帖子


谢谢军哥,我卸载了opcache就好了,在php.ini注释掉应该是没有效果...
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-28 11:19 , Processed in 0.026673 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表