错误提示 nginx: [emerg] unknown directive "gzip_static"
1、检查nginx配置文件错误提示如下:
[root@server nginx]# /applications/nginx/sbin/nginx -t -c /applications/nginx/nginx/nginx.conf
nginx: [emerg] unknown directive "gzip_static" in /applications/nginx/nginx/inc/gzip.conf:4
nginx: configuration file /applications/nginx/nginx/nginx.conf test failed
2、查看nginx的编译参数
[root@server nginx]# /applications/nginx/sbin/nginx -V
nginx version: nginx/1.6.0
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC)
TLS SNI support enabled
configure arguments: --user=www --group=www --add-module=../ngx_cache_purge-1.3/ --prefix=/applications/nginx-1.6.0 --with-http_stub_status_module --with-http_ssl_module --with-http_flv_module
3、解决方式,重新编译、安装nginx,增加--with-http_gzip_static_module参数
[root@server nginx-1.6.0]# ./configure --user=www --group=www --add-module=../ngx_cache_purge-1.3/ --prefix=/applications/nginx-1.6.0 --with-http_stub_status_module --with-http_ssl_module --with-http_flv_module --with-http_gzip_static_module
[root@server nginx-1.6.0]# make && make install
错误提示 nginx: [emerg] unknown directive "gzip_static"的更多相关文章
- nginx: [emerg] unknown directive “ ” in /usr/local/nginx/nginx.conf.conf:xx报错处理
当我们在修改Nginx的配置文件,然后加载配置文件./nginx -s reload 报错类似的错误, nginx: [emerg] unknown directive “ ” in /usr/l ...
- nginx:[emerg]unknown directive "ssl"
nginx: [emerg] unknown directive "ssl" in /usr/local/nginx/conf/nginx.conf:102 到解压的nginx目录 ...
- Nginx配置SSL报错 nginx: [emerg] unknown directive "ssl"
Nginx配置SSL报错 nginx: [emerg] unknown directive "ssl" 出现如图所示错误,处理办法如下 去nginx解压目录下执行 ./co ...
- nginx: [emerg] unknown directive “ ” in /usr/local/nginx/conf/vhost/XXX.conf:53报错处理
开发同事发给我一小段nginx配置,加到服务器上之后,执行nginx -s reload时,出现报错: nginx: [emerg] unknown directive “ ” in /usr/loc ...
- nginx: [emerg] unknown directive "聽" in D:\software03\GitSpace\cms\nginx-1.14.0/conf/nginx.conf:36
nginx: [emerg] unknown directive "聽" in D:\software03\GitSpace\cms\nginx-1.14.0/conf/nginx ...
- nginx: [emerg] unknown directive "stub_status" in /home/oscf/nginx/conf/conf.d/ngx_metric.conf
解压安装过程命令如下: cd /home/oscf #该目录下有nginx压缩包 mkdir nginx tar -zxvf nginx-1.16.0.tar.gz cd nginx-1.16.0 . ...
- nginx报错:nginx: [emerg] unknown directive in /etc/nginx/conf.d/test.conf:4
nginx报错:nginx: [emerg] unknown directive in /etc/nginx/conf.d/test.conf:4 解决: 第四行出现了 tab 空格 , 换成正常的 ...
- 启动Nginx 出现 nginx: [emerg] unknown directive "锘?user" 错误
出现这种情况 一般是修改配置文件 nginx.conf 造成的 如果你修改文件后出现 那基本上就是这个原因 启动不了 重新打开 改为UTF-8 无BOM编码
- nginx: [emerg] unknown directive "stub_status" in /usr/local/openresty/nginx/conf/conf.d/ngx_metric.conf:19
问题分析 Nginx没有添加modules/ngx_http_stub_status_module.o模块. 问题解决 没有安装的话,可以在tar包安装编译的时候添加如下参数: # ./configu ...
随机推荐
- SRS用例
团队项目:超市管理系统 作者:王琨 个人博客地址:http://www.cnblogs.com/wangkun123 一. 用例视图概述 一般的超市商品管理系统,主要由五大模块组成,即商品信 ...
- Spring整合SpringMVC
整合:把在springMVC配置文件中的spring提取出来整合为另一份配置文件 希望: 1).Spring的配置文件只是用来配置和业务逻辑有关的功能(数据源.事务控制.切面....) 2).Spri ...
- Integrating Jenkins and Apache Tomcat for Continuous Deployment
Installation via Maven WAR Overlay - Jenkins - Jenkins Wikihttps://wiki.jenkins.io/display/JENKINS/I ...
- Java abstract interface与 interface的区别
我们常常遇到abstract class与 interface的区别,今天却遇到了abstract interface,感觉interface不用abstract再修饰了啊.结论:事实也确实如此,编译 ...
- WPF将数据库和GridView绑定并更改GridView模板
首先来看一下如何使用GridView,在前台的话代码如下:这里仅仅举出一个例子,GridView是作为子项嵌套在ListView中的,这里的数据源是通过绑定的方式来绑定到GridView中的. < ...
- jq 事件取消绑定与重新绑定
前端有时会碰到这样的需求: 点击某个元素发送ajax请求, 发送期间此元素的鼠标相关事件(比如点击)无效, 发送完成鼠标点击事件功能恢复, 对于这种需求, 我们会遇到两种情况, 一种是点击的按钮为fo ...
- solr string类型表示不支持分词
solr string类型表示不支持分词
- Luogu4609 FJOI2016建筑师(斯特林数)
显然排列中的最大值会将排列分成所能看到的建筑不相关的两部分.对于某一边,将所能看到的建筑和其遮挡的建筑看成一个集合.显然这个集合内最高的要排在第一个,而剩下的建筑可以随便排列,这相当于一个圆排列.同时 ...
- JAVA内部类小结
内部类的概念:定义在其他类里面的类叫做内部类,包含内部类的类叫做外部类: 内部类的作用:内部类主要是用来描述一个事物存在于另一个事物里面,依赖于外部事物存在的: 内部类的格式: 内部类的分类: 成员内 ...
- Centos7下Zabbix3.4至Zabbix4.0的升级步骤
点击返回:自学Zabbix之路 点击返回:自学Zabbix4.0之路 点击返回:自学zabbix集锦 Centos7下Zabbix3.4至Zabbix4.0的升级步骤 查看现在centos版本和zab ...