VeryNginx icon indicating copy to clipboard operation
VeryNginx copied to clipboard

nginx: [emerg] "expires" directive invalid value in /opt/verynginx/verynginx/nginx_conf/in_server_block.conf:15

Open goodjimli opened this issue 7 years ago • 4 comments

nginx: [emerg] "expires" directive invalid value in /opt/verynginx/verynginx/nginx_conf/in_server_block.conf:15

这个是什么情况呢?

goodjimli avatar Dec 16 '16 08:12 goodjimli

nginx 版本:Tengine/2.1.2 (nginx/1.6.2)

goodjimli avatar Dec 16 '16 08:12 goodjimli

请问你使用了 static backend 吗? 如果使用了可能是配置的时间字段填写的不对,如果没使用这个,可能是 tengine 的兼容性问题,可以换 nginx 试试看

发自我的 iPhone

在 2016年12月16日,下午4:23,goodjimli [email protected] 写道:

nginx 版本:Tengine/2.1.2 (nginx/1.6.2)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

alexazhou avatar Dec 16 '16 08:12 alexazhou

命令无效,目测是模块问题。 首先看下你的依赖模块是怎么安装的,是使用的openresty还是手动编译的添加到nginx里面的。 检查依赖的模块是否正确、完整添加,如果确认已正确添加,则建议: 1、换种方式重新添加或者重新安装模块; 2、完全重新安装; 3、换nginx试试,我试用nginx1.9.9和1.11.8版本安装测试都正常

cell13 avatar Feb 13 '17 15:02 cell13

Tengine version: Tengine/2.1.2 (nginx/1.6.2)

Tengine 2.1.2版本中的nginx的版本为1.6.2,不支持expires指令。导致报错。 https://stackoverflow.com/questions/40236617/expires-in-nginx-conf-throws-error-on-ubuntu-but-not-on-osx

解决办法:升级到Tengine2.2.0。 官方描述:http://tengine.taobao.org/

继承Nginx-1.8.1的所有特性,兼容Nginx的配置;

JoyChou93 avatar Jun 01 '17 02:06 JoyChou93