我突然有一个奇怪的问题,我敢肯定,我已经取消了应用程序的罪魁祸首,但我本质上不是服务器pipe理员,所以我可能是错的。
从我的家,办公室和其他networking加载罚款。 在Verizon,它不是加载,给错误太多的redirect。 当我的手机或我的笔记本电脑上加载我的手机时,这是真实的。
问题似乎在昨天晚上出现,至less在我们注意到的时候。
我怀疑这是在服务器configuration的东西,但我的Nginxconfiguration似乎是正确的:
server { listen 80; listen [::]:80 ipv6only=off; server_name launchwestco.com *.launchwestco.com; rewrite ^ https://$host$request_uri? permanent; } server { listen 443 ssl; listen [::]:443 ssl ipv6only=off; server_name launchwestco.com *.launchwestco.com; root /home/forge/envoyer/com.launchwestco/current/public; client_max_body_size 55M; underscores_in_headers on; # FORGE SSL (DO NOT REMOVE!) ssl_certificate [...]/server.crt; ssl_certificate_key [...]/server.key; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; index index.html index.htm index.php; charset utf-8; location ~* /auth/(.+) { return 301 /authentication/$1; } # FORGE CONFIG (DOT NOT REMOVE!) include forge-conf/launchwestco.com/server/*; location / { try_files $uri $uri/ /index.php?$query_string; } location = /favicon.ico { access_log off; log_not_found off; } location = /robots.txt { access_log off; log_not_found off; } access_log off; error_log /var/log/nginx/launchwestco.com-error.log error; error_page 404 /index.php; location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } location ~ /\.ht { deny all; } } upstream discourse { server 127.0.0.1:85; } server { listen 443 ssl; server_name community.launchwestco.com; return 301 http://community.launchwestco.com$request_uri; } server { listen 80; server_name community.launchwestco.com; # FORGE CONFIG (DOT NOT REMOVE!) include forge-conf/launchwestco.com/server/*; location / { access_log off; proxy_pass http://discourse; } }
netstat -tlp显示以下内容(仅截取到http / s输出):
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 *:http *:* LISTEN 4880/nginx -g daemo tcp 0 0 *:https *:* LISTEN 4880/nginx -g daemo tcp6 0 0 [::]:https [::]:* LISTEN 4880/nginx -g daemo
(我不知道为什么一行[::]:http缺失…我不知道这个问题是否重要。)
即使我插入代码die('DEBUGGING'); 作为应用程序的前端控制器的第一行 – 应该运行的PHP的第一个执行行 – 错误仍然发生,我没有得到应用程序的预期输出。
我正在用最困难的时间排除故障。 应用程序中一定会有redirect,但这些似乎并不是罪魁祸首,因为它们在大多数ISP上的performance都如预期。 只有Verizon Mobile才会出现这个问题(无论如何我们都知道)。
任何想法可能会导致我们的问题?
您遇到的问题是您的网站通过IPv4访问时工作,但通过IPv6访问时返回太多的redirect。
要解决它:
你的nginxconfiguration有错误,导致它加载失败。
尤其是,您在IPv6 listen指令中指定了ipv6only=off ,还指定了IPv4 listen指令。 预期的响应是nginx返回一个错误98 Address already in use和退出(或拒绝重新加载configuration)。 如果nginx仍在运行,那么很可能是使用旧的configuration。
您应该首先从每个listen指令中删除ipv6only=off ,因为它是多余的和不必要的。
然后,您应该将IPv6 listen指令添加到缺less它们的server块。