在Apache中为ViewVC启用SSL

时间:2019-05-20 21:55:20

标签: apache ssl viewvc

以下是我尝试为其启用SSL的ViewVC虚拟主机。

<VirtualHost *:80>
        DocumentRoot /var/www
        ScriptAlias /cgi-bin/ "/var/www/cgi-bin"
        ScriptAlias /viewvc /var/www/cgi-bin/viewvc.cgi
        ScriptAlias /query /var/www/cgi-bin/query.cgi
<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>
</VirtualHost>

如果我只删除VirtualHost行(并依靠ssl.conf中的配置),它似乎可以正常工作。

DocumentRoot /var/www
ScriptAlias /cgi-bin/ "/var/www/cgi-bin"
ScriptAlias /viewvc /var/www/cgi-bin/viewvc.cgi
ScriptAlias /query /var/www/cgi-bin/query.cgi
<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

另一方面,如果我将必要的SSL配置添加到原始虚拟主机,则会收到一条错误消息,指出/ viewvc不存在。

<VirtualHost *:443>
    **SSLEngine on**
    **SSLCertificateFile /../cert.pem**
    **SSLCertificateKeyFile /../key.pem**
    **ServerName server1**
    **ServerAlias server1.domain.com**
    DocumentRoot /var/www
    ScriptAlias /cgi-bin/ "/var/www/cgi-bin"
    ScriptAlias /viewvc /var/www/cgi-bin/viewvc.cgi
    ScriptAlias /query /var/www/cgi-bin/query.cgi
        <Directory "/var/www/cgi-bin">
           AllowOverride None
           Options None
           Order allow,deny
           Allow from all
        </Directory>
</VirtualHost>

如果有人可以向我解释这一点,将不胜感激。

干杯。

0 个答案:

没有答案