ngx_http_google_filter_module icon indicating copy to clipboard operation
ngx_http_google_filter_module copied to clipboard

unknown directive "goole" in /etc/nginx/conf/nginx.conf:44

Open 2020SJ opened this issue 6 years ago • 10 comments

我按照教程上来,但一直报这个错,我这台服务器被我重装后也是如此。查看配置中有这个选项,恳请大神帮我看看。 nginx: [emerg] unknown directive "goole" in /etc/nginx/conf/nginx.conf:44 nginx: configuration file /etc/nginx/conf/nginx.conf test failed nginx -V nginx version: nginx/1.14.2 built by gcc 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) built with OpenSSL 1.0.1j 15 Oct 2014 TLS SNI support enabled configure arguments: --prefix=/etc/nginx --with-pcre=../pcre-8.38 --with-openssl=../openssl-1.0.1j --with-zlib=../zlib-1.2.11 --with-http_ssl_module --add-module=../ngx_http_google_filter_module --add-module=../ngx_http_substitutions_filter_module

location / { goole on; }

2020SJ avatar Feb 03 '19 08:02 2020SJ

是不是要写成 google

intecos avatar Feb 03 '19 10:02 intecos

  1. 你的NGINX版本太高了,出现了不兼容,请务必使用nginx-1.7.8
  2. google on;

Chapoly1305 avatar Feb 05 '19 18:02 Chapoly1305

  1. 你的NGINX版本太高了,出现了不兼容,请务必使用nginx-1.7.8
  2. google on;

现在nginx都1.13了,1.7那个版本好多现在的模块都不兼容

banditsmile avatar Feb 15 '19 12:02 banditsmile

  1. 你的NGINX版本太高了,出现了不兼容,请务必使用nginx-1.7.8
  2. google on;

使用nginx1.7.8版本编译的时候openssl又报错,麻烦大神赶紧更新一下

banditsmile avatar Feb 15 '19 12:02 banditsmile

nginx 版本导致的无法安装或者找不到google插件暂时无解 (能将就用就将就用着嘛) openssl报错能不能贴一下报错的内容?初步估计是因为你的路径设置有误

Chapoly1305 avatar Feb 15 '19 23:02 Chapoly1305

改成用dev分支吧。不要用master即可。

xiaohuid avatar Feb 18 '19 08:02 xiaohuid

  1. 你的NGINX版本太高了,出现了不兼容,请务必使用nginx-1.7.8
  2. google on;

使用nginx1.7.8版本编译的时候openssl又报错,麻烦大神赶紧更新一下

用README里的那个版本的openssl库就可以了

PHCSJC avatar Feb 19 '19 03:02 PHCSJC

编译时使用add-dynamic-module

./configure \
  <your configuration> \
  --add-dynamic-module=</path/to/>ngx_http_google_filter_module \
  --add-module=</path/to/>ngx_http_substitutions_filter_module

配置文件中添加

load_module modules/ngx_http_google_filter_module.so;

我的环境

Tengine version: Tengine/2.3.2
nginx version: nginx/1.17.3
ngx_http_google_filter_module version: branch dev

slaier avatar Sep 22 '19 08:09 slaier

整了一天,1.7.8确实能识别google on,但是和我配置有一些兼容的问题,还是放弃了,最后改了一下localtion搞定:参考 https://zhgcao.github.io/2016/06/09/nginx-reverse-proxy-google/

larva2333 avatar Apr 11 '20 03:04 larva2333

编译时使用add-dynamic-module

./configure \
  <your configuration> \
  --add-dynamic-module=</path/to/>ngx_http_google_filter_module \
  --add-module=</path/to/>ngx_http_substitutions_filter_module

配置文件中添加

load_module modules/ngx_http_google_filter_module.so;

我的环境

Tengine version: Tengine/2.3.2
nginx version: nginx/1.17.3
ngx_http_google_filter_module version: branch dev

整了一天,1.7.8确实能识别google on,但是和我配置有一些兼容的问题,还是放弃了,最后改了一下localtion搞定:参考 https://zhgcao.github.io/2016/06/09/nginx-reverse-proxy-google/

经测试,两者均可以实现,但是第一种方法相对方便,且能与较高版本的nginx匹配,支持多种模块。 成品图 参考: 搭建google镜像网站(适用最新版nginx)Module for Google Mirror

Colorfulshadow avatar Aug 13 '20 13:08 Colorfulshadow