多个端口,SSL问题

时间:2015-11-09 04:43:50

标签: apache

我已经搜索了一段时间,但无法得到一个特殊的答案。 我在CentOS env中配置了一个服务器,在我的vhost.conf中配置了以下配置:

<VirtualHost *:80>
    DocumentRoot /xyz/dir
    DirectoryIndex index.html index.php
    CustomLog /var/log/xyz/access.log common
    ErrorLog /var/log/xyz/error.log
    <Directory /xyz/dir>
        Options +Includes +FollowSymLinks -Indexes -ExecCGI
        AllowOverride FileInfo AuthConfig
        Require all granted
    </Directory>
</VirtualHost>


<VirtualHost *:83>
    DocumentRoot /abc/dir
    DirectoryIndex index.html index.php
    CustomLog /var/log/abc/access.log common
    ErrorLog /var/log/abc/error.log
    <Directory /abc/dir>
        Options +Includes +FollowSymLinks -Indexes -ExecCGI
        AllowOverride FileInfo AuthConfig
        Require all granted
    </Directory>
</VirtualHost>

如您所见,我已在不同端口上配置了2个具有相同IP的站点。现在我正在尝试在两个站点上配置ssl,我希望两者同时激活http和https。

我做了一些搜索并使用ssl对其进行了配置,并添加了以下内容: -

<VirtualHost _default_:443>
    SSLEngine on
    SSLProtocol All -SSLv2 -SSLv3
    SSLCipherSuite ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM:+SSLv3
    SSLCACertificateFile /path-to-ca-bundle
    SSLCertificateFile /path-to-crt
    SSLCertificateKeyFile path-to-key
    SSLVerifyClient none
    SSLVerifyDepth 10
    DocumentRoot /xyz/dir
    ServerName 1.1.1.1:80
    DirectoryIndex index.html index.php
    CustomLog /var/log/xyz/access.log common
    ErrorLog /var/log/xyz/error.log
    <Directory /xyz/dir>
        Options +Includes +FollowSymLinks -Indexes -ExecCGI
        AllowOverride FileInfo AuthConfig
        Require all granted
    </Directory>
</VirtualHost>

# Did the same for :83

现在,当我点击

时,此功能正常
https://1.1.1.1/ --> points to xyz
http://1.1.1.1/ --> points to xyz

http://1.1.1.1:83/ --> points to abc
https://1.1.1.1:83/ --> throws ssl_error_rx_record_too_long error

https on:83无效。需要帮助!

另外https://1.1.1.1:80/ --> throws ssl_error_rx_record_too_long error 相反https://1.1.1.1/ --> works just fine and points to xyz

0 个答案:

没有答案