在ubuntu上的Apache2中,我的站点监听80,现在我想添加SSL。有没有一种方法可以为端口443启用SSLEngine,所以我不必复制整个VirtualHost块?
当我这样做时:
Listen 80
Listen 443
NameVirtualHost *
<VirtualHost *>
SSLEngine On
... a bunch more lines...
</VirtualHost>
它正在为端口80打开SSLEngine。是否可以仅使用一个VirtualHost块,而仅为端口443打开SSLEngine?所以我可以做这样的事情吗?
Listen 80
Listen 443
NameVirtualHost *
<VirtualHost *>
<IfPort 443>
SSLEngine On
</IfPort>
... a bunch of lines I don't want to copy into another VirutalHost block...
</VirtualHost>