VPS侦探论坛

 找回密码
 注册
12
返回列表 发新帖
楼主: ads321

404 Not Found 请问一下。。我添加了SSL证书以后。HTTPS还是无法查找怎么办

[复制链接]
 楼主| 发表于 2018-1-3 10:08:48 | 显示全部楼层

回复 13# 的帖子


我修改以后重启lnmp 变成这样了


Shutting down MySQL. SUCCESS!
Gracefully shutting down php-fpm  done
Starting LNMP...
Starting nginx... nginx (pid 12602 12600) already running.
Starting MySQL.. SUCCESS!
Starting php-fpm  done
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2018-1-3 10:53:46 | 显示全部楼层

回复 15# 的帖子



你写的这么乱,
给你看看我这的虚拟主机的配置
server {
        listen 80;
        server_name www.xx.top;
        rewrite ^(.*) https://$host$1 permanent;
}

server
    {
        listen 443;
        #listen [::]:80;
        server_name www.xx2.top;
        index index.html index.htm index.php default.html default.htm default.php;
        root  /www/xx2/;
                ssl on;
        ssl_certificate cert/www.xx2.top.crt;
        ssl_certificate_key cert/www.xx2.top.key;
        ssl_session_timeout 5m;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
        ssl_prefer_server_ciphers on;
        include /usr/local/nginx/conf/rewrite/xx2.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 /var/log/www.xx2.top.log;
    }
感觉你写的太乱了,一个跳转,都写了那么多没有用的。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2018-1-3 12:30:47 | 显示全部楼层

回复 17# 的帖子


谢谢   我弄好了
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2018-1-3 12:31:07 | 显示全部楼层

回复 2# 的帖子




谢谢军哥  我弄好了
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-24 19:15 , Processed in 0.026458 second(s), 14 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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