php - 当我尝试使用 4G 连接访问我的网站时出现空白页面(ssl 错误)?
问题描述
我的一些客户在尝试使用 4G 互联网访问我的网站时正在尝试空白页面。
通过积累案例,我发现它总是一个特定的4G供应商:布依格电信(法国供应商)。可能是其他提供者,但这是最经常出现的。
我有一个运行 Nginx 和 php5 的 Ubuntu 网络服务器。
可悲的是,我找不到那些空白屏幕连接的任何 nginx 日志。
当我与笔记本电脑共享布依格 4G 连接时,我也遇到了 mozzila 上的 PR_CONNECT_RESET_ERROR 的问题。或者小米手机上的 ERR_CONNECTION_RESET。
最后一首,我可以通过这个没有 ssl conf 的 4G 连接访问我的预生产网站。
有人对我正在试验的东西有想法。
您将在我的 nginx conf 下方找到:
server {
listen 80 default_server;
allow all;
server_name _;
return 301 https://$host$request_uri;
}server {
listen 443 default_server ssl;
allow all;
ssl on;
ssl_certificate /etc/nginx/ssl/2020_easyrenter.crt;
ssl_certificate_key /etc/nginx/ssl/easyrenter.fr.key; ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_dhparam /etc/nginx/ssl/dhparam.pem;
ssl_prefer_server_ciphers on;
ssl_session_cache builtin:1000 shared:SSL:10m;
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains';
ssl_stapling_verify on;
resolver 8.8.4.4 8.8.8.8 valid=300s;
resolver_timeout 10s; server_name www.easyrenter.fr easyrenter.fr 46.101.103.115;
root /home/deploy/easyrenter/current/; location = /sitemap.xml {
alias /home/deploy/easyrenter/current/sitemap.xml;
} location = /sitemaps/en/sitemap.xml {
alias /home/deploy/easyrenter/current/sitemaps/en/sitemap.xml;
} location = /sitemaps/fr/sitemap.xml {
alias /home/deploy/easyrenter/current/sitemaps/fr/sitemap.xml;
} location / {
index index.html index.php;
try_files $uri/ @handler;
expires 30d;
} location ~ \.(js|css|png|jpg|gif|ico|pdf|tiff|swf) {
try_files $uri $uri/;
expires 356d;
} location ^~ /app/ {deny all;}
location ^~ /includes/ {deny all;}
#location ^~ /lib/ {deny all;}
location ^~ /media/downloadable/ {deny all;}
location ^~ /pkginfo/ {deny all;}
location ^~ /report/config.xml {deny all;}
location ^~ /var/ {deny all;} location /var/export {
auth_basic "restricted";
auth_basic_user_file htpasswd;
autoindex on;
} location /. {
return 404;
} location @handler {
rewrite / /index.php;
}# location ~ .php {
# rewrite ^(.*.php)/ $1 last;
# } location ~ \.php$ {
if (!-e $request_filename) { rewrite / /index.php last;}
expires off;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_param HTTPS $fastcgi_https;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
proxy_read_timeout 300; } #Poids max des upload files
client_max_body_size 32M; include /etc/nginx/nginx-redirection.conf;
}
解决方案
我找到了解决方案。
布依格 4G 迫使我的服务器使用 IPV6。
起初,使用 4G Bouygues 的用户的请求页面停止了。猜测这是一个 IPV6 问题,我在我的服务器上激活了一个 IPV6,并在我的 DNS 上添加了一个 AAAA 条目。
然后 4G Bouygues 用户有一个空白页面,因为我的 nginx conf 中没有声明 IPV6。下面是我的补充:
server {
listen 80;
**listen [::]:80;**
allow all;
server_name _;
return 301 https://$host$request_uri;
}
server {
listen 443 default_server ssl http2;
**listen [::]:443 default_server ssl http2;**
希望它会帮助别人,阿克塞尔
推荐阅读
- puppeteer - 使用 Puppeteer 保存屏幕截图时如何在我的计算机中创建一个文件夹
- ios - iOS,Swift:如何在相同的评级控制代码上添加/扩展点击操作
- php - DB:多列之间的匹配和评分(3D 数据集)
- javascript - 如何使表单条目相互镜像?
- marklogic - Marklogic 任务服务器中队列大小增加的影响
- android - java.lang.ClassNotFoundException: android.support.v7.app.AppCompatViewInflater
- ios - Swift CoreData 子对多实体无法通过父对象访问
- javascript - 在初始化变量时将大括号放在变量周围有什么作用?
- macos - MacOS - 此磁盘不使用 GUID 分区表方案错误
- sql - 是否可以通过 ping 网站获得一些有用的信息?