咨询热线:4006-75-4006
售前:9:00-23:30 备案:9:00-18:00 技术:7*24h
Apache 安装设置证书支持https
Listen 443
80端口配置开始
<VirtualHost *:80>
ServerAdmin admin@ domain.com
DocumentRoot "{此处写网站绝对路径}"
DirectoryIndex index.html index.php
ServerName domain.com
ServerAlias www.landui.com
<Directory "{此处写网站绝对路径}"> #如 D:/wwwroot/web1
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
## 80端口结束
## 443端口 SSL配置开始
<VirtualHost *:443>
ServerAdmin admin@domain.com
DocumentRoot "{此处写网站绝对路径}"
DirectoryIndex index.html index.php
ServerName domain.com #域名
ServerAlias www.landui.com #域名
SSLEngine on
SSLCertificateFile ssl\2_domain.com.crt
SSLCertificateKeyFile ssl\3_domain.com.key
SSLCertificateChainFile ssl\1_root_bundle.crt
# 把下载好的证书加压出来复制到Apahce 安装目录下 ssl 文件夹内,分别修改上面三行中的
# 2_domain.com.crt 3_domain.com.key 1_root_bundle.crt 为您的证书文件名称
<Directory "{此处写网站绝对路径}">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
# SSL配置结束