cuber / ngx_http_google_filter_module

Nginx Module for Google Mirror
BSD 2-Clause "Simplified" License
3.35k stars 780 forks source link

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

Open 2020SJ opened 5 years ago

2020SJ commented 5 years ago

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

是不是要写成 google

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

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

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

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

Chapoly1305 commented 5 years ago

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

xiaohuid commented 5 years ago

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

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

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

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

slaier commented 4 years ago

编译时使用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 commented 4 years ago

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

Colorfulshadow commented 4 years ago

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