标签存档: https

https阿里云续期即ssl证书更新

https阿里云续期

https://help.aliyun.com/document_detail/28544.html?spm=a2c4g.11186623.2.7.26583f1fmhfisC#concept-bty-rfp-ydb

ssl证书更新
https://yundunnext.console.aliyun.com/?spm=a2c4g.11186623.2.10.3f0c7cc4N8XBdt&p=cas#/overview/cn-hangzhou

新买免费ssl证书
https://yundun.console.aliyun.com/?spm=5176.7968328.J_8413632810.1.5e9765c3FS9M11&p=cas&showBuy=1#/certExtend/free

https://www.aliyun.com/product/cas
ps:选单域名,dv免费省银子

XAMPP多站点 开启 SSL (https)

1.编辑 /opt/lampp/etc/php.ini 文件,找到 “;extension=php_openssl.dll” (去掉前面的;号注释)

2.需要配置 httpd-ssl.conf 文件(opt/lampp/etc/extra/httpd-ssl.conf)
配置 DocumentRoot 和 ServerName ,改成自己定义的;
配置三个证书文件

SSLCertificateFile "/opt/lampp/etc/ssl.crt"
SSLCertificateKeyFile "/opt/lampp/etc/ssl.key"
SSLCertificateChainFile "/opt/lampp/etc/ssl_chain.crt"#记得去掉它前面的#号
    or
#SSLCertificateFile "/etc/letsencrypt/live/xxx.com/fullchain.pem"
#SSLCertificateKeyFile "/etc/letsencrypt/live/xxx.com/privkey.pem"

完整配置参考:

<VirtualHost *:443>
ServerAdmin nbllq@qq.com
DocumentRoot "/opt/lampp/htdocs/test/web/"
ServerName xxx.amyflash.com

SSLEngine on
SSLCertificateFile "/opt/lampp/etc/ssl.crt"
SSLCertificateKeyFile "/opt/lampp/etc/ssl.key"
SSLCertificateChainFile "/opt/lampp/etc/ssl_chain.crt"
<Directory "/opt/lampp/htdocs/test/web/">
Options FollowSymLinks
AllowOverride All
Require all granted

ErrorLog "logs/www.test.com-error_log"
CustomLog "|/opt/lampp/bin/rotatelogs /opt/lampp/logs/www.test.com-access_log_%Y-%m-%d 86400 480" common
</VirtualHost>

3.访问80端口需要在httpd-vhosts.conf里面配置

<VirtualHost *:80>
ServerAdmin nbllq@qq.com
DocumentRoot "/opt/lampp/htdocs/test/web/"
ServerName xxx.amyflash.com
#RewriteEngine On
#RewriteRule ^/(.*)$ https://xxx.amyflash.com/$1 [R=301,L]
</VirtualHost>

4.将http跳转到https上,网站根目录下加入.htaccess文件

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R,L]

ps:多站点多证书对应配置即可
阿里云官方文档:https://help.aliyun.com/knowledge_detail/95493.html?spm=a2c4g.11186623.2.11.35da34f1JnB78t