VPS侦探论坛

 找回密码
 注册
查看: 2761|回复: 1

lnmpa 设置缓存失败

[复制链接]
发表于 2017-7-25 17:30:43 | 显示全部楼层 |阅读模式

安装了lnmpa1.4,在conf目录下修改nginx.conf和nginx_a.conf,修改为7天过期, 也service reload nginx了       location ~ .*\.(js|css)?$        {
            expires      7d;
        }




但是浏览器上看到file:///C:\Users\Administrator\AppData\Roaming\Tencent\Users\798681196\QQ\WinTemp\RichOle\QPBCFZC{XEI8U1XYKILVHHF.png过期时间还是默认的12小时,请问军哥下是我修改错了吗
responsehead中,expires过期时间还是默认的12h,
  • Server: nginx
  • Last-Modified: Mon, 26 Jun 2017 05:24:21 GMT
  • ETag: "59509a85-acd0"
  • Cache-Control: max-age=43200


[ 本帖最后由 xyclucky 于 2017-7-25 17:40 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-7-25 20:55:38 | 显示全部楼层


需改这个参数没错,但不是lnmp安装包conf目录下修改nginx.conf和nginx_a.conf
而是要修改对应域名的虚拟主机的配置文件,https://lnmp.org/faq/lnmp-software-list.html 官网上都有详细的说明
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-25 17:10 , Processed in 0.026072 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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