AMH面板配置SSL域名证书方法


安装SSL扩展模块BBshijieSSL1.1

把.KEY和.CRT两个文件,黏贴到对应的文本框中保存。

打开域名对应的conf

vi /usr/local/nginx/conf/vhost/www.vpscuxiao.com.conf

添加下面的代码。

if ($server_port = 80) {
return 301 https://$server_name$request_uri;
}
if ($scheme = http) {
return 301 https://$server_name$request_uri;
}
error_page 497 https://$server_name$request_uri;

amh nginx restart重启nginx

标签: ,

文章发布时间:2019-10-29