在Let'sEncrypt成功申请免费SSL证书后,可获得四份文件,默认放在这里:
/etc/letsencrypt/live/域名/fullchain。pem
/etc/letsencrypt/live/域名/privkey。pem
/etc/letsencrypt/live/域名/cert。pem
/etc/letsencrypt/live/域名/chain。pem
然后配置apache启动SLL
Ubuntu使用SSL模块非常简单
$sudossl
$sudodefault-ssl。conf
成功启动后,在:/etc/apache2/mods-enabled#可以在#中找到ssl。conf同时配置文件/etc/apache2/的ports。conf监控端口。
ApacheSSL配置文件default-ssl。conf
<virtualhost*:>ssl软件下载。
ServerName域名
SSLEngineOn
SSLCertificateFile/etc/letsencrypt/live/域名/cert。pem
SSLCertificateKeyFile/etc/letsencrypt/live/域名/privkey。pem
SSLCertificateChainFile/etc/letsencrypt/live/域名/chain。pem<FilesMatch"。(cgi|shtml|phtml|php)$">
SSLOptions StdEnvVars</FilesMatch>网站ssl证书下载。
<Directory/usr/lib/cgi-bin>
SSLOptions StdEnvVars</Directory>
#######其余和普通DjangoApache配置一样</virtualhost>开发者ssl软件下载。
http重定向配置文件
<virtualhost*:80>
ServerName域名
RewriteEngineon
RewriteCond%{HTTPS}off
RewriteRule^(。*)$https://域名%{REQUEST_URI}[R=,L]</virtualhost>
apache打开rewrite
要使上述重定向生效,需要启动apacherewrite模块。
$sudorewrite
打开端口sll证书怎么下载。
这里使用的UFW防火墙需要打开端口
ufwallow怎么下载网站证书。
重启Aapche服务器
$开发者SSL下载。
打开网站就能看到https。
中企动力是一家专业的网络推广公司,我们拥有丰富的网络推广经验和专业的团队,能够为企业提供全方位的网络推广服务。我们为企业提供网站建设、网站优化、平台推广等服务,帮中企动力业在网络上提升知名度、扩大影响力、提升销售额。如果您有网络推广的需求,欢迎联系中企动力加微信:CE4006608066,我们将竭诚为您服务。