404 Not Found 请问一下。。我添加了SSL证书以后。HTTPS还是无法查找怎么办
404 Not Found请问一下。。我添加了SSL证书以后。HTTPS还是无法查找怎么办 问题描述的不清楚回复 2# 的帖子
www.7shb.com这个论坛我是后加的SSL,证书申请是一年的。http可以正常访问。但是HTTPS访问显示404回复 3# 的帖子
什么网站程序,贴配置文件看一下 <?phpdefine('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 编辑 ] <?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);
回复 6# 的帖子
虚拟主机配置文件回复 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,不知道你有没有改。
回复 7# 的帖子
我这个是搬瓦工的VPS。。。。回复 7# 的帖子
userwww www;worker_processes auto;
error_log/home/wwwlogs/nginx_error.logcrit;
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_typeapplication/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_length1k;
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 \.";
#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;
}
回复 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;
rootwww.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 编辑 ]
回复 8# 的帖子
我试一试。。。修改一下看看行不行。回复 11# 的帖子
你自己看看你之前设置的网站目录 root是啥,现在https 设置的是什么,对比一下就知道哪里又问题了回复 13# 的帖子
两个root 后面不一样回复 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;
rootwww.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;
}
页:
[1]
2