我将Wheezy服务器升级到Jessie,并且Apache 2.4停止工作。
特别是在443端口没有ssl ….
telnet myhost 443 GET https://myhost <html><meta http-equiv='Content-Type' content='text/html; charset=utf-8'/><body>Something in /var/www/html/index.html</body></html>>Connection closed by foreign host.
它应该是:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>400 Bad Request</title> </head><body> <h1>Bad Request</h1> <p>Your browser sent a request that this server could not understand.<br /> Reason: You're speaking plain HTTP to an SSL-enabled server port.<br /> Instead use the HTTPS scheme to access this URL, please.<br /> </p> </body></html> Connection closed by foreign host.
SSLEngine是开着的 – 昨天一切正常,但它是Wheezy,而不是Jessie …
*更新*新鲜的头脑 – 我发现,连接到:443被logging到/var/log/apache2/access.log而不是/var/log/apache2-ssl/access.log但是为什么?
解决scheme很难find…只有巧合帮助我find它。
Apache2.4需要.conf扩展….
我有两个文件: /etc/apache2/sites-available/http和/etc/apache2/sites-available/https ,当然也是/etc/apache2/sites-enabled/的相同符号链接。
试图找出解决scheme,我采取了default-ssl.conf并使其成为一个符号链接,它的工作原理! 所以我复制每一行,找出差异在哪里,什么都没有find。 我将https重命名为https.conf ,创build了一个符号链接,它也起作用了!
最大的错误是,我自己创build符号链接,而不是使用a2ensite – 这将产生该网站不存在 – 直到重命名为http.conf 。
6小时的search没有什么…叹息….但也许这将帮助别人..
您是否阅读过Apache 2.4的发行说明?
“值得注意的是,访问控制指令发生了很大变化,需要手动迁移到新的指令。
我有同样的问题使用授权configuration。 这是发现和改变的延迟。
<Directory /var/www/webalizer> Options Indexes FollowSymlinks MultiViews # AllowOverride all # Order allow,deny Require all granted </Directory>
旧的设置是评论(#)。 它对你有用吗?