VPS侦探论坛

 找回密码
 注册
查看: 3167|回复: 2

lnmp 最新+阿里云香港ECS,IP/port 都通,但 https 无法访问

[复制链接]
发表于 2018-6-21 10:57:37 | 显示全部楼层 |阅读模式

使用 http 是可以正常访问的,但是使用 https 就无法访问,刚安装完偶尔可以打开一次,后来就再也没打开过。确认过防火墙没有拦截 443 端口。以下是各个配置文件的配置:
  1. server
  2.     {
  3.         listen 80;
  4.         #listen [::]:80;
  5.         server_name xiaobanma.net www.xiaobanma.net bbs.xiaobanma.net ;
  6.         index index.html index.htm index.php default.html default.htm default.php;
  7.         root  /home/wwwroot/bbs.xiaobanma.net;

  8.         rewrite ^(.*)$  https://bbs.xiaobanma.net$1 permanent;

  9.         include rewrite/discuzx.conf;
  10.         #error_page   404   /404.html;

  11.         # Deny access to PHP files in specific directory
  12.         #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }

  13.         include enable-php-pathinfo.conf;

  14.         location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  15.         {
  16.             expires      30d;
  17.         }

  18.         location ~ .*\.(js|css)?$
  19.         {
  20.             expires      12h;
  21.         }

  22.         location ~ /.well-known {
  23.             allow all;
  24.         }

  25.         location ~ /\.
  26.         {
  27.             deny all;
  28.         }

  29.         access_log on;
  30.     }

  31. server
  32.     {
  33.         listen 443 ssl http2;
  34.         #listen [::]:443 ssl http2;
  35.         server_name bbs.xiaobanma.net ;
  36.         index index.html index.htm index.php default.html default.htm default.php;
  37.         root  /home/wwwroot/bbs.xiaobanma.net;
  38.         ssl on;
  39.         ssl_certificate /usr/local/nginx/conf/ssl/bbs.xiaobanma.net/fullchain.cer;
  40.         ssl_certificate_key /usr/local/nginx/conf/ssl/bbs.xiaobanma.net/bbs.xiaobanma.net.key;
  41.         ssl_session_timeout 5m;
  42.         ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  43.         ssl_prefer_server_ciphers on;
  44.         ssl_ciphers "EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5";
  45.         ssl_session_cache builtin:1000 shared:SSL:10m;
  46.         # openssl dhparam -out /usr/local/nginx/conf/ssl/dhparam.pem 2048
  47.         ssl_dhparam /usr/local/nginx/conf/ssl/dhparam.pem;

  48.         include rewrite/discuzx.conf;
  49.         #error_page   404   /404.html;

  50.         # Deny access to PHP files in specific directory
  51.         #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }

  52.         include enable-php-pathinfo.conf;

  53.         location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  54.         {
  55.             expires      30d;
  56.         }

  57.         location ~ .*\.(js|css)?$
  58.         {
  59.             expires      12h;
  60.         }

  61.         location ~ /.well-known {
  62.             allow all;
  63.         }

  64.         location ~ /\.
  65.         {
  66.             deny all;
  67.         }

  68.         access_log on;
  69.     }
复制代码


防火墙规则:

  1. # Generated by iptables-save v1.6.0 on Wed Jun 13 13:29:06 2018
  2. *nat
  3. :PREROUTING ACCEPT [5497:296903]
  4. :INPUT ACCEPT [5496:296863]
  5. :OUTPUT ACCEPT [276:18384]
  6. :POSTROUTING ACCEPT [276:18384]
  7. :DOCKER - [0:0]
  8. -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER
  9. -A OUTPUT ! -d 127.0.0.0/8 -m addrtype --dst-type LOCAL -j DOCKER
  10. -A POSTROUTING -s 192.168.0.0/20 ! -o docker0 -j MASQUERADE
  11. -A DOCKER -i docker0 -j RETURN
  12. COMMIT
  13. # Completed on Wed Jun 13 13:29:06 2018
  14. # Generated by iptables-save v1.6.0 on Wed Jun 13 13:29:06 2018
  15. *filter
  16. :INPUT ACCEPT [0:0]
  17. :FORWARD DROP [0:0]
  18. :OUTPUT ACCEPT [0:0]
  19. :DOCKER - [0:0]
  20. :DOCKER-ISOLATION - [0:0]
  21. :DOCKER-USER - [0:0]
  22. -A INPUT -i lo -j ACCEPT
  23. -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
  24. -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
  25. -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
  26. -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
  27. -A INPUT -p tcp -m tcp --dport 3306 -j DROP
  28. -A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
  29. -A FORWARD -j DOCKER-USER
  30. -A FORWARD -j DOCKER-ISOLATION
  31. -A FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
  32. -A FORWARD -o docker0 -j DOCKER
  33. -A FORWARD -i docker0 ! -o docker0 -j ACCEPT
  34. -A FORWARD -i docker0 -o docker0 -j ACCEPT
  35. -A DOCKER-ISOLATION -j RETURN
  36. -A DOCKER-USER -j RETURN
  37. COMMIT
  38. # Completed on Wed Jun 13 13:29:06 2018
复制代码


discuz 开启了伪静态,同目录下新建一个 phpinfo 的测试文件,用 https 也无法访问,请教到底是哪里出了问题?
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2018-6-21 18:02:22 | 显示全部楼层


测试访问正常
国外的国内访问都可能受到qiang的影响,之前就有部分反映qiang对https网站进行干扰
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2018-6-27 17:43:54 | 显示全部楼层

这个很恶心呀,准备换服务器试试了。我这里也是大部分可以访问,只有个别环境是无法访问的。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-23 23:35 , Processed in 0.025593 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表