VPS侦探论坛

 找回密码
 注册
查看: 7332|回复: 18

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

[复制链接]
发表于 2018-1-1 08:51:50 | 显示全部楼层 |阅读模式

404 Not Found  请问一下。。我添加了SSL证书以后。HTTPS还是无法查找怎么办
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2018-1-1 19:41:06 | 显示全部楼层


问题描述的不清楚
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2018-1-2 09:03:51 | 显示全部楼层

回复 2# 的帖子


www.7shb.com  这个论坛我是后加的SSL  ,证书申请是一年的。http可以正常访问  。但是HTTPS访问显示404
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2018-1-2 10:24:30 | 显示全部楼层

回复 3# 的帖子




什么网站程序,贴配置文件看一下
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2018-1-2 11:27:00 | 显示全部楼层

<?php
define('UC_DBHOST', 'localhost');
define('UC_DBUSER', '2h');我把这个隐藏一下
define('UC_DBPW', 'sa2');我把这个隐藏一下
define('UC_DBNAME', '23h');我把这个隐藏一下
define('UC_DBCHARSET', 'utf8');
define('UC_DBTABLEPRE', 'pre_ucenter_');
define('UC_COOKIEPATH', '/');
define('UC_COOKIEDOMAIN', '');
define('UC_DBCONNECT', 0);
define('UC_CHARSET', 'utf-8');
define('UC_FOUNDERPW', '9293c49c01a1f9310c307');这个隐藏一下
define('UC_FOUNDERSALT', 'ydJbZa');
define('UC_KEY', 'VdxbEaVfZ3C1A7p7r0i0X63aOf60B9r7b26Qfn29eG3E7Ye524aA1');这个隐藏一下
define('UC_SITEID', 'edybsaKfX3t1s7j740m1q0D6o2RaQfr0L0fbbYfV23s7Ve12laS1');这个隐藏一下
define('UC_MYKEY', 'Md2bIafe3fea1w7U7b0F086yajfl0n0G9E7cflbG6Z2Q3p7geI2taK1');这个隐藏一下
define('UC_DEBUG', false);
define('UC_PPP', 20);

[ 本帖最后由 ads321 于 2018-1-2 11:28 编辑 ]

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

 楼主| 发表于 2018-1-2 11:27:51 | 显示全部楼层

<?php


define('UC_CONNECT', 'mysql');

define('UC_DBHOST', 'localhost');
define('UC_DBUSER', '234');这个隐藏一下
define('UC_DBPW', 'sakd2这个隐藏一下
define('UC_DBNAME', '3h');这个隐藏一下
define('UC_DBCHARSET', 'utf8');
define('UC_DBTABLEPRE', '`23h`.pre_ucenter_');这个隐藏一下
define('UC_DBCONNECT', 0);

define('UC_CHARSET', 'utf-8');
define('UC_KEY', 'HdhbladfAGeB1Yl01427aMfzz7ofeb56jfb2NeRAax1');这个隐藏一下
define('UC_API', 'http://www.7shb.com/uc_server');
define('UC_APPID', '1');
define('UC_IP', '');
define('UC_PPP', 20);
发表于 2018-1-2 12:15:00 | 显示全部楼层

回复 6# 的帖子


虚拟主机配置文件
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2018-1-2 14:23:13 | 显示全部楼层

回复 6# 的帖子


ssl on;
        ssl_certificate cert/www.XX.top.crt;
        ssl_certificate_key cert/www.XXX.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/9522.conf;
这是要添加的SSL配置文件,还就就是这个文件里面要改端口为443,不知道你有没有改。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2018-1-2 16:12:14 | 显示全部楼层

回复 7# 的帖子


我这个是搬瓦工的VPS。。。。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2018-1-2 16:13:34 | 显示全部楼层

回复 7# 的帖子




user  www www;

worker_processes auto;

error_log  /home/wwwlogs/nginx_error.log  crit;

pid        /usr/local/nginx/logs/nginx.pid;

#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 51200;

events
    {
        use epoll;
        worker_connections 51200;
        multi_accept on;
    }

http
    {
        include       mime.types;
        default_type  application/octet-stream;

        server_names_hash_bucket_size 128;
        client_header_buffer_size 32k;
        large_client_header_buffers 4 32k;
        client_max_body_size 50m;

        sendfile   on;
        tcp_nopush on;

        keepalive_timeout 60;

        tcp_nodelay on;

        fastcgi_connect_timeout 300;
        fastcgi_send_timeout 300;
        fastcgi_read_timeout 300;
        fastcgi_buffer_size 64k;
        fastcgi_buffers 4 64k;
        fastcgi_busy_buffers_size 128k;
        fastcgi_temp_file_write_size 256k;

        gzip on;
        gzip_min_length  1k;
        gzip_buffers     4 16k;
        gzip_http_version 1.1;
        gzip_comp_level 2;
        gzip_types     text/plain application/javascript application/x-javascript text/javascript text/css application/xml application/xml+rss;
        gzip_vary on;
        gzip_proxied   expired no-cache no-store private auth;
        gzip_disable   "MSIE [1-6]\.";

        #limit_conn_zone $binary_remote_addr zone=perip:10m;
        ##If enable limit_conn_zone,add "limit_conn perip 10;" to server section.

        server_tokens off;
        access_log off;

server {
listen 80 default_server;
server_name _;
rewrite ^(.*) https://www.7shb.com permanent;
}
include vhost/*.conf;
}
 楼主| 发表于 2018-1-2 16:18:39 | 显示全部楼层

回复 7# 的帖子


这个是网站虚拟主机的网址。。您看一下。


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

        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/www.7shb.com.log;
    }

server
    {
        listen 443 ssl http2;
        #listen [::]:443 ssl http2;
        server_name www.7shb.com wwww.7shb.com 7shb.com;
        index index.html index.htm index.php default.html default.htm default.php;
        root  www.7shb.com;
                ssl on;
        ssl_certificate /home/wwwroot/www.7shb.com/apache/www.7shb.com.crt;
        ssl_certificate_key /home/wwwroot/www.7shb.com/apache/www.7shb.com.key;
        ssl_session_timeout 5m;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers on;
        ssl_ciphers "EECDH+CHACHA20:EEC3DES: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 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/www.7shb.com.log;
    }

[ 本帖最后由 ads321 于 2018-1-2 16:21 编辑 ]
 楼主| 发表于 2018-1-2 16:19:20 | 显示全部楼层

回复 8# 的帖子


我试一试。。。修改一下看看行不行。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2018-1-3 08:38:52 | 显示全部楼层

回复 11# 的帖子

你自己看看你之前设置的网站目录 root是啥,现在https 设置的是什么,对比一下就知道哪里又问题了
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2018-1-3 09:56:58 | 显示全部楼层

回复 13# 的帖子

两个root 后面不一样

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

 楼主| 发表于 2018-1-3 10:08:13 | 显示全部楼层

回复 13# 的帖子

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

        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/www.7shb.com.log;
    }

server
    {
        listen 443 ssl http2;
        #listen [::]:443 ssl http2;
        server_name www.7shb.com 7shb.com;
        index index.html index.htm index.php default.html default.htm default.php;
        root  www.7shb.com 7shb.com;
                ssl on;
        ssl_certificate /home/wwwroot/www.7shb.com/apache/www.7shb.com.crt;
        ssl_certificate_key /home/wwwroot/www.7shb.com/apache/www.7shb.com.key;
        ssl_session_timeout 5m;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers on;
        ssl_ciphers "EECDH+CHACHA20:EECD256: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 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/www.7shb.com.log;
    }
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-24 19:24 , Processed in 0.038241 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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