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

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

Open
xclimbing opened this issue Jul 4, 2016 · 4 comments
Open

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

xclimbing opened this issue Jul 4, 2016 · 4 comments

Comments

@xclimbing
Copy link

xclimbing commented Jul 4, 2016

我的配置文件如下:

`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
Copy link

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

@xclimbing
Copy link
Author

谢谢回复。下面这个信息是不是意味着加了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
Copy link

加了. 那我也不知為啥

@cuber
Copy link
Owner

cuber commented Nov 16, 2018

试试最新的 dev 分支

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

3 participants