cuber / ngx_http_google_filter_module

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

我的反向代理哪里配置错误? #118

Open xclimbing opened 8 years ago

xclimbing commented 8 years ago

我的配置文件如下:

`server { listen 80; server_name g.my.net g.you.net ssma.my.net ssma.you.net; location / { proxy_pass https://g.my.net/; } }

upstream www.google.com { server 172.217.24.228:443; server 216.58.208.100:443; server 172.217.18.68:443; server 216.58.219.36:443; server 216.58.223.4:443; server 172.217.1.196:443; server 216.58.193.100:443; }

server { listen 443; server_name g.my.net g.you.net ssma.my.net ssma.you.net; ssl on; ssl_certificate /etc/letsencrypt/live/g.my.net/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/g.my.net/privkey.pem; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; ssl_ciphers ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM; ssl_session_cache shared:SSL:10m; ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; keepalive_timeout 70; resolver 8.8.8.8;

location / {
    google on;
    google_language "zh-CN";
}

}`

当我直接访问 https://g.my.net 的时候,Chrome或者firefox会提示类似的信息: g.my.net redirected you too many times. Try: Reloading the page Clearing your cookies ERR_TOO_MANY_REDIRECTS

但如果我用: https://g.my.net/search?q=8964 就可以正常搜索。

我的问题到底出在哪里?请各位达人指教。谢谢。

jokester commented 8 years ago

编译nginx时加了ssl没? 见 #114

xclimbing commented 8 years ago

谢谢回复。下面这个信息是不是意味着加了ssl了?

nginx -V nginx version: nginx/1.8.0 built by gcc 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) built with OpenSSL 1.0.1e-fips 11 Feb 2013 TLS SNI support enabled configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-http_spdy_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --add-module=/root/rpmbuild/BUILD/nginx-1.8.0/ngx_http_substitutions_filter_module-04dfb4c66c854a0627a5c3b940695b5fd6553b8b --add-module=/root/rpmbuild/BUILD/nginx-1.8.0/ngx_http_google_filter_module-fe9f35206941fd1a22cf29e828c34b63ca7ced81

jokester commented 8 years ago

加了. 那我也不知為啥

cuber commented 5 years ago

试试最新的 dev 分支