问题描述
微信小程序要求后台接口必须是https的,在阿里云申请了免费的ssl证书,并按其提供的教程配置https://help.aliyun.com/knowl... ,但是配置完后访问提示403forbidden
ssl证书配置在我的二级域名上,api.xyz.com,这个域名下不是一个网站,只是后台接口,配置前和配置后用http请求都可以访问,配置后https访问就报403
后台项目放在根目录下"/data/wwwroot/default",域名配置在"/data/wwwroot/default/projectname"下
apache httpd.conf文件配置了根目录,没有配置项目的目录
DocumentRoot "/data/wwwroot/default"
<Directory "/data/wwwroot/default">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
域名配置如下
<VirtualHost *:80>
ServerAdmin admin@abc.com
DocumentRoot "/data/wwwroot/default/projectname"
ServerName api.xyz.com
ErrorLog "logs/api.xyz.com.error.log"
CustomLog "logs/api.xyz.com.access.log" combined
</VirtualHost>
在网上搜了很多也没有解决,求大神指点