【问题标题】:SSL Certificates and Apache Virtual HostsSSL 证书和 Apache 虚拟主机
【发布时间】:2016-11-05 09:59:10
【问题描述】:

我的 ubuntu 服务器设置遇到了一个非常奇怪的问题。我正在使用 LAMP 堆栈运行一些网站。

其中一个网站有一个专用 ip 和一个 comodo ssl 证书。其他网站使用共享 ip 并使用 let'sencrypt ssl 证书。

这是专用 ip 上网站的虚拟主机配置:

# domain: example.com
# public: /home/myhomefolder/public/example.com/

<VirtualHost actual_dedicated_ip:80>
  # Admin email, Server Name (domain name), and any aliases
  ServerAdmin admin@example.com
  ServerName  www.example.com
  ServerAlias example.com
  Redirect permanent / https://www.example.com/
  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.html index.php
  DocumentRoot /home/myhomefolder/public/example.com/public

  # Log file locations
  LogLevel warn
  ErrorLog  /home/myhomefolder/public/example.com/log/error.log
  CustomLog /home/myhomefolder/public/example.com/log/access.log combined
</VirtualHost>
<VirtualHost actual_dedicated_ip:443>
     SSLEngine On
     SSLProtocol ALL -SSLv2 -SSLv3
     SSLHonorCipherOrder On
     SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS
     SSLCertificateFile /etc/apache2/ssl/www.example.com.crt
     SSLCertificateKeyFile /etc/apache2/ssl/www.example.com.key
     SSLCertificateChainFile /etc/apache2/ssl/www.example.com.ca-bundle
     <Directory /home/myhomefolder/public/example.com/public>
       Require all granted
       AllowOverride ALL
     </Directory>     
     ServerAdmin admin@example.com
     ServerName example.com
     DocumentRoot /home/myhomefolder/public/example.com/public
     ErrorLog /home/myhomefolder/public/example.com/log/https_error.log
     CustomLog /home/myhomefolder/public/example.com/log/https_access.log combined
</VirtualHost>

除了在特定网络上一切正常(到目前为止,我只能在连接到 Verizon LTE 时在我的 iPhone 上重现此问题,但在连接到 wifi 时无法重现)我收到错误消息“Safari 无法打开页面,因为发生了太多重定向" 或者我收到“无法验证服务器身份”的提示,并且证书详细信息适用于同一主机上的另一个网站,但 IP 不同。

有什么可能导致这种情况的想法吗?

【问题讨论】:

  • 看来你可能会在Ask Ubuntu得到更好的答案
  • @paisanco 感谢您的建议!
  • @paisanco 不,改为Server Fault

标签: apache ssl virtual-hosts


【解决方案1】:

所以我终于明白了这一点。看起来 verizon 正在使用 ipv6,而我的虚拟主机只有 ipv4 配置。一旦我在我的虚拟主机中添加了我的 ipv6 ip,问题就消失了。

【讨论】:

    猜你喜欢
    • 2013-01-27
    • 2011-01-31
    • 1970-01-01
    • 1970-01-01
    • 2014-06-21
    • 2010-09-21
    • 2021-01-22
    • 1970-01-01
    • 2017-05-22
    相关资源
    最近更新 更多