目前,我的apache配置包括一个SSL证书(所有域都作为可选主题名列出)。此外,每个域都有一个虚拟主机配置,它同时为SSL和非SSL请求提供服务。所有这些都发生在一个公共IP上。
我想切换到多个SSL证书,每个域一个,使用主题名称指示。我知道,如果我复制所有vhost配置条目,一次用于端口80,一次在端口443中使用SSL (正如在SF上已经讨论过的那样),这是可能的。
但是,我更希望有一些类似于我目前的设置的东西,具有以下特性:
这有可能吗?
发布于 2013-01-08 07:08:31
无法绕过Apache支持此配置所需的虚拟主机的结构;<VirtualHost>块需要存在,并且需要包含配置指令来设置侦听器。
你能做的最好就是这样..。
<VirtualHost *:80>
# Give this file the directives like ServerName and DocumentRoot that
# are the same between 80 and 443:
Include /etc/confdir/domain-a.conf
</VirtualHost>
<VirtualHost *:443>
# Same file as above, so config will be "shared"
Include /etc/confdir/domain-a.conf
# SSL directives for this domain (SSLEngine, cert config) in this file:
Include /etc/confdir/ssl/domain-a-ssl.conf
</VirtualHost>https://serverfault.com/questions/463832
复制相似问题