VPS侦探论坛

 找回密码
 注册
查看: 4119|回复: 6

配置https 不起作用,求解

[复制链接]
发表于 2018-3-27 09:16:07 | 显示全部楼层 |阅读模式

server
    {
        listen 80;
        #listen [::]:80;
        server_name www.ooo.com ooo.com;
        index index.html index.htm index.php default.html default.htm default.php;
        root  /home/wwwroot/ooo;

        include other.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.conf;

        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires      30d;
        }
        location / {
            index  index.php index.html index.htm;

             if (!-e $request_filename)
             {

                rewrite ^/(.*)$ /index.php?s=$1;

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

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

        location ~ /\.
        {
            deny all;
        }

        access_log  /home/wwwlogs/ooo.log;
    }

server
    {
        listen 443 ssl http2;
        #listen [::]:443 ssl http2;
        server_name www.ooo.com ooo.com;
        index index.html index.htm index.php default.html default.htm default.php;
        root  /home/wwwroot/ooo;
        ssl on;
        ssl_certificate /var/certs/ooo/21454308000027.pem;
        ssl_certificate_key /var/certs/ooo/21454308000027.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;
        location / {
            index  index.php index.html index.htm;
            
             if (!-e $request_filename)
             {
               
                rewrite ^/(.*)$ /index.php?s=$1;

             }
        }
        include other.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.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  /home/wwwlogs/ooo.log;
    }

[ 本帖最后由 浅夏的黑夜 于 2018-3-27 09:20 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2018-3-27 10:46:51 | 显示全部楼层


配置文件没有问题,没有具体访问错误信息、环境信息、网络环境等信息,没法确定原因
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2018-3-27 10:52:36 | 显示全部楼层

回复 2# 的帖子


无法访问此网站
www.feiyu-tech.com 的响应时间过长。
请试试以下办法:

检查网络连接
检查代理服务器和防火墙
运行 Windows 网络诊断
ERR_TIMED_OUT





谷歌浏览器显示的是这样的,,请问https不起作用,一般错误去哪里看日志,
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2018-3-27 11:06:05 | 显示全部楼层

回复 3# 的帖子




这边访问该域名的https站点是正常的
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2018-3-27 11:08:53 | 显示全部楼层

回复 4# 的帖子


www.feiyu-tech.com,这个域名,服务商安全组,防火墙都已添加了443端口的

[ 本帖最后由 浅夏的黑夜 于 2018-3-27 11:19 编辑 ]

军哥运维代购:http://shop63846532.taobao.com/

发表于 2018-3-27 19:08:00 | 显示全部楼层

回复 5# 的帖子


我们这边访问正常,自行检查你网络环境
 楼主| 发表于 2018-3-28 09:44:54 | 显示全部楼层

回复 6# 的帖子


https的哦,我们这一直访问不了,,https://www.feiyu-tech.com
用手机4G网络可访问,估计是我们这边的网络问题,但是之前是可以访问的,访问其他配置的https的站点也是正常的,怪了

[ 本帖最后由 浅夏的黑夜 于 2018-3-28 09:54 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-24 11:29 , Processed in 0.027155 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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