lnmp 最新+阿里云香港ECS,IP/port 都通,但 https 无法访问
使用 http 是可以正常访问的,但是使用 https 就无法访问,刚安装完偶尔可以打开一次,后来就再也没打开过。确认过防火墙没有拦截 443 端口。以下是各个配置文件的配置:server
{
listen 80;
#listen [::]:80;
server_name xiaobanma.net www.xiaobanma.net bbs.xiaobanma.net ;
index index.html index.htm index.php default.html default.htm default.php;
root/home/wwwroot/bbs.xiaobanma.net;
rewrite ^(.*)$https://bbs.xiaobanma.net$1 permanent;
include rewrite/discuzx.conf;
#error_page 404 /404.html;
# Deny access to PHP files in specific directory
#location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }
include enable-php-pathinfo.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /.well-known {
allow all;
}
location ~ /\.
{
deny all;
}
access_log on;
}
server
{
listen 443 ssl http2;
#listen [::]:443 ssl http2;
server_name bbs.xiaobanma.net ;
index index.html index.htm index.php default.html default.htm default.php;
root/home/wwwroot/bbs.xiaobanma.net;
ssl on;
ssl_certificate /usr/local/nginx/conf/ssl/bbs.xiaobanma.net/fullchain.cer;
ssl_certificate_key /usr/local/nginx/conf/ssl/bbs.xiaobanma.net/bbs.xiaobanma.net.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5";
ssl_session_cache builtin:1000 shared:SSL:10m;
# openssl dhparam -out /usr/local/nginx/conf/ssl/dhparam.pem 2048
ssl_dhparam /usr/local/nginx/conf/ssl/dhparam.pem;
include rewrite/discuzx.conf;
#error_page 404 /404.html;
# Deny access to PHP files in specific directory
#location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }
include enable-php-pathinfo.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /.well-known {
allow all;
}
location ~ /\.
{
deny all;
}
access_log on;
}
防火墙规则:
# Generated by iptables-save v1.6.0 on Wed Jun 13 13:29:06 2018
*nat
:PREROUTING ACCEPT
:INPUT ACCEPT
:OUTPUT ACCEPT
:POSTROUTING ACCEPT
:DOCKER -
-A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER
-A OUTPUT ! -d 127.0.0.0/8 -m addrtype --dst-type LOCAL -j DOCKER
-A POSTROUTING -s 192.168.0.0/20 ! -o docker0 -j MASQUERADE
-A DOCKER -i docker0 -j RETURN
COMMIT
# Completed on Wed Jun 13 13:29:06 2018
# Generated by iptables-save v1.6.0 on Wed Jun 13 13:29:06 2018
*filter
:INPUT ACCEPT
:FORWARD DROP
:OUTPUT ACCEPT
:DOCKER -
:DOCKER-ISOLATION -
:DOCKER-USER -
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 3306 -j DROP
-A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A FORWARD -j DOCKER-USER
-A FORWARD -j DOCKER-ISOLATION
-A FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -o docker0 -j DOCKER
-A FORWARD -i docker0 ! -o docker0 -j ACCEPT
-A FORWARD -i docker0 -o docker0 -j ACCEPT
-A DOCKER-ISOLATION -j RETURN
-A DOCKER-USER -j RETURN
COMMIT
# Completed on Wed Jun 13 13:29:06 2018
discuz 开启了伪静态,同目录下新建一个 phpinfo 的测试文件,用 https 也无法访问,请教到底是哪里出了问题? 测试访问正常
国外的国内访问都可能受到qiang的影响,之前就有部分反映qiang对https网站进行干扰 这个很恶心呀,准备换服务器试试了。我这里也是大部分可以访问,只有个别环境是无法访问的。
页:
[1]