Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2020SJ opened this issue Feb 3, 2019 · 10 comments
Open

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

2020SJ opened this issue Feb 3, 2019 · 10 comments

Comments

@2020SJ
Copy link

2020SJ commented Feb 3, 2019

我按照教程上来,但一直报这个错,我这台服务器被我重装后也是如此。查看配置中有这个选项,恳请大神帮我看看。
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; }

@intecos
Copy link

intecos commented Feb 3, 2019

是不是要写成 google

@Chapoly1305
Copy link

Chapoly1305 commented Feb 5, 2019

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

@banditsmile
Copy link

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

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

@banditsmile
Copy link

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

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

@Chapoly1305
Copy link

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

@xiaohuid
Copy link

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

@PHCSJC
Copy link

PHCSJC commented Feb 19, 2019

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

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

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

@slaier
Copy link

slaier commented Sep 22, 2019

编译时使用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

@larva2333
Copy link

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

@Colorfulshadow
Copy link

Colorfulshadow commented Aug 13, 2020

编译时使用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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants