virtualhost:执行http和https糟糕的浏览器呈现

时间:2013-12-31 13:16:46

标签: linux apache2 virtualhost

我有完全相同的http虚拟主机配置文件,浏览器的渲染是可以的。我已将(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>

1 个答案:

答案 0 :(得分: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.