【问题标题】:virtualhost: doing http and https bad browser renderingvirtualhost:做 http 和 https 错误的浏览器渲染
【发布时间】:2014-01-18 10:16:48
【问题描述】:

我的http virtualhost配置文件完全相同,浏览器的渲染是好的。我已将(debian)新的 https 虚拟主机添加到 /etc/apache/site-available 但浏览器的呈现不正确。

您可以显示两个网站的运行情况:

http://www.mokaccino.it/index.php (works)
https://www.mokaccino.it/index.php (bad)

<VirtualHost *:443>
ServerSignature Off
ServerAdmin info@example.com
ServerName example.com
ServerAlias www.example.com
SSLEngine on
SSLCertificateFile    /etc/apache2/ssl/apache.pem
DirectoryIndex index.html index.php
DocumentRoot /home/example.com/

suPHP_Engine on
AddHandler x-httpd-php .php .php3 .php4 .php5
suPHP_AddHandler x-httpd-php

suPHP_ConfigPath /home/example.com/
<Directory /home/example.com/>
Options -Includes -Indexes -FollowSymLinks -ExecCGI +MultiViews
AllowOverride none
Order allow,deny
Allow from all
</Directory>

ErrorLog /home/example.com/logs/error.log
CustomLog /home/example.com/logs/access.log combined
</VirtualHost>

【问题讨论】:

    标签: linux apache2 virtualhost


    【解决方案1】:

    http 和 https 都可以正常工作。唯一的问题是您有一个自签名的 https 证书,因此浏览器会向您发出警告。你可以用 curl 试试:

    curl -v -k https://www.mokaccino.it/index.php
    
    * SSLv3, TLS handshake, Client hello (1):
    * SSLv3, TLS handshake, Server hello (2):
    * SSLv3, TLS handshake, CERT (11):
    * SSLv3, TLS handshake, Server key exchange (12):
    * SSLv3, TLS handshake, Server finished (14):
    * SSLv3, TLS handshake, Client key exchange (16):
    * SSLv3, TLS change cipher, Client hello (1):
    * SSLv3, TLS handshake, Finished (20):
    * SSLv3, TLS change cipher, Client hello (1):
    * SSLv3, TLS handshake, Finished (20):
    * SSL connection using DHE-RSA-AES256-SHA
    * Server certificate:
    *    subject: C=IT; ST=Milano; L=Legnano; O=pineappleweb.it; OU=pineappleweb.it; CN=pineappleweb.it; emailAddress=info@pineappleweb.it
    *    start date: 2013-07-04 12:47:19 GMT
    *    expire date: 2033-06-29 12:47:19 GMT
    *    issuer: C=IT; ST=Milano; L=Legnano; O=pineappleweb.it; OU=pineappleweb.it; CN=pineappleweb.it; emailAddress=info@pineappleweb.it
    *    SSL certificate verify result: self signed certificate (18), continuing anyway.
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-11-16
      • 1970-01-01
      • 2019-10-27
      • 2013-08-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多