用 letsencrypt 弄了证书,然后准备配置 apache,配置完访问提示 403 forbidden,但是 http 访问正常
该站点的单独配置文件如下:
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "/data/wwwroot/www.chanzhicms.com" ServerName www.chanzhicms.com ServerAlias chanzhicms.com ErrorLog "/data/wwwlogs/www.chanzhicms.com_error_apache.log" CustomLog "/data/wwwlogs/www.chanzhicms.com_apache.log" combined <Directory "/data/wwwroot/www.chanzhicms.com"> SetOutputFilter DEFLATE Options FollowSymLinks ExecCGI Require all granted AllowOverride All Order allow,deny Allow from all DirectoryIndex index.html index.php <VirtualHost *:443> DocumentRoot /data/wwwroot/www.chanzhicms.com ServerName https://www.chanzhicms.com:443 ServerAdmin [email protected] SSLEngine on SSLCertificateFile /etc/letsencrypt/live/www.chanzhicms.com/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/www.chanzhicms.com/privkey.pem SSLCertificateChainFile /etc/letsencrypt/live/www.chanzhicms.com/chain.pem
<Directory "/data/wwwroot/www.chanzhicms.com">
SetOutputFilter DEFLATE
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
DirectoryIndex index.html index.php
</Directory>