asiatrust部署完https访问403,http可以正常访问
麻烦各位大佬帮忙看下代码,环境是lnmp1.7 centos 7.0nginx1.18
mysql 5.7
php7.4
server
{
listen 80;
#listen [::]:80;
server_name www.abc.com abc.com;
index index.html index.htm index.php default.html default.htm default.php;
root/home/wwwroot/abc;
include rewrite/wordpress.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.abc.com.log;
}
server {
#SSL 访问端口号为 443
listen 443 ssl;
#填写绑定证书的域名
server_name abc.com www.abc.com;
#证书文件名称
ssl_certificate /usr/local/nginx/conf/1_abc.com_bundle.crt;
#私钥文件名称
ssl_certificate_key /usr/local/nginx/conf/2_abc.com.key;
ssl_session_timeout 5m;
#请按照以下协议配置
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
#请按照以下套件配置,配置加密套件,写法遵循 openssl 标准。
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
location / {
#网站主页路径。此路径仅供参考,具体请您按照实际目录操作。
root /home/wwwroot/abc;
indexindex.html index.htm;
}
}
补充内容 (2021-5-14 09:26):
wordpress文件夹的属于用户www,有次更新插件要求填FTP就改成了这个vhost里的nginx的conf文件所有者是root 不会自己写配置文件的话,将你自己写的配置内容删掉,直接用 lnmp ssl add 进行添加
页:
[1]