WIldcard SSL子域不指向正确的DocumentRoot 3

我有同样的问题比: WIldcard SSL子域不指向正确的DocumentRoot但答案不帮助我。

我在我的Apache服务器上安装了通配符SSL。

使用HTTP:

  • www.example.com指向documentroot / home / example / public_html确定
  • sub.example.com指向documentroot / home / sub_example / public_html确定

现在使用HTTPS:

  • www.example.com指向documentroot / home / example / public_html确定
  • sub.example.com指向documentroot / home / example / public_html(NOK:与上面的主域相同)。

我已经将.conf文件检查到/ etc / apache2 / sites-available中,并且至less对于documentroot指令是可以的。

为什么子域指向主域的documentroot? 而这只有当SSL?

谢谢

这听起来像一个虚拟主机configuration问题。 看看apache2 -S的输出。

在Ubuntu上,我必须首先获取一些环境variables,然后运行: ( . /etc/apache2/envvars ; apache2 -S )