使用 xampp 在 ubuntu 服务器上禁用 TLS 1 TLS1.1

发布于 2025-01-13 13:35:05 字数 2477 浏览 4 评论 0原文

抱歉,为了解决这个常见问题,我在网上找到了很多资源,但没有一个对我有用。

我在 Ubuntu Server 20.04 上安装了 Apache/2.4.51 (Unix) OpenSSL/1.1.1l PHP/7.3.33 mod_perl/2.0.11 Perl/v5.32.1 和 XAMPP。

我的 SSL 证书是使用 LetsEncrypt Certbot https://certbot.eff.org/

我仍然明白这一点来自 Qualys https://www.ssllabs.com/ssltest/

This server supports TLS 1.0 and TLS 1.1

我所做的结果。

在 /etc/letsencrypt/options-ssl-apache.conf 上,

SSLEngine on

#SSLProtocol             all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
SSLProtocol             +TLSv1.2 +TLSv1.3

SSLHonorCipherOrder     on

# enabling Perfect Forward Secrecy
SSLCipherSuite HIGH:!aNULL:!MD5:!3DES

SSLCompression          off
SSLOptions +StrictRequire

我尝试了许多其他方法来编写它,但没有一个起作用。

在 /opt/lampp/etc/extra/httpd-vhosts.conf 上

<VirtualHost *:443>
    #ServerAdmin [email protected]
    #DocumentRoot "/opt/lampp/htdocs/"
    ServerName myserver.name
    SSLEngine On
    Include /etc/letsencrypt/options-ssl-apache.conf
    SSLCertificateFile /etc/letsencrypt/live/myserver.name/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/myserver.name/privkey.pem
    SSLProtocol -all +TLSv1.3 +TLSv1.2
    ErrorLog "logs/myserver.name-error_log"
    CustomLog "logs/myserver.name-access_log" common
</VirtualHost>

但似乎没有效果。我读到,letsencrypt options-ssl-apache.conf 会覆盖任何 Apache SSL 指令。

我在 SSL 评估中做了一些改进,添加了“完美前向保密”,但我认为它可以更加稳健。当我成功禁用 TLSv1.x 时,我将尝试使用此 指南

还有 /opt/lampp/etc/extra/httpd-ssl.conf 但它没有编写 SSLProtocol 指令,所以我避免编辑它。

我已经编辑了 /opt/lampp/etc/original/extra/httpd-ssl.conf

SSLHonorCipherOrder on

SSLCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES
SSLProxyCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES

#SSLProtocol all -SSLv3
SSLProtocol +TLSv1.2 +TLSv1.3 -TLSv1 -TLSv1.1 -SSLv3 -SSLv2

#SSLProxyProtocol all -SSLv3
SSLProxyProtocol +TLSv1.2 +TLSv1.3

SSLEngine on

再次,它似乎没有任何效果。

显然我已经停止并重新启动了服务器。

sudo /opt/lampp/lampp stop

sudo /opt/lampp/lampp start

感谢您的帮助。

Sorry, to bother with this common issue which I found lots of resources on the web but non has worked for me.

I have Apache/2.4.51 (Unix) OpenSSL/1.1.1l PHP/7.3.33 mod_perl/2.0.11 Perl/v5.32.1 installed with XAMPP on Ubuntu Server 20.04.

My SSL certificate has been made with letsencrypt Certbot https://certbot.eff.org/

I still get this result from Qualys https://www.ssllabs.com/ssltest/

This server supports TLS 1.0 and TLS 1.1

What I did.

On /etc/letsencrypt/options-ssl-apache.conf

SSLEngine on

#SSLProtocol             all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
SSLProtocol             +TLSv1.2 +TLSv1.3

SSLHonorCipherOrder     on

# enabling Perfect Forward Secrecy
SSLCipherSuite HIGH:!aNULL:!MD5:!3DES

SSLCompression          off
SSLOptions +StrictRequire

I tried many other way to write it but none has worked.

On /opt/lampp/etc/extra/httpd-vhosts.conf

<VirtualHost *:443>
    #ServerAdmin [email protected]
    #DocumentRoot "/opt/lampp/htdocs/"
    ServerName myserver.name
    SSLEngine On
    Include /etc/letsencrypt/options-ssl-apache.conf
    SSLCertificateFile /etc/letsencrypt/live/myserver.name/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/myserver.name/privkey.pem
    SSLProtocol -all +TLSv1.3 +TLSv1.2
    ErrorLog "logs/myserver.name-error_log"
    CustomLog "logs/myserver.name-access_log" common
</VirtualHost>

but it seems has no effect. I read that letsencrypt options-ssl-apache.conf overrides any Apache SSL directives.

I made some improvement in my SSL evaluation adding Perfect Forward Secrecy, but I think it could be more robust. When I'll succeed to disable TLSv1.x I'll try to use this guide.

There is also /opt/lampp/etc/extra/httpd-ssl.conf but it has no SSLProtocol directive written, so I've avoided to edit it.

I have edited instead /opt/lampp/etc/original/extra/httpd-ssl.conf

SSLHonorCipherOrder on

SSLCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES
SSLProxyCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES

#SSLProtocol all -SSLv3
SSLProtocol +TLSv1.2 +TLSv1.3 -TLSv1 -TLSv1.1 -SSLv3 -SSLv2

#SSLProxyProtocol all -SSLv3
SSLProxyProtocol +TLSv1.2 +TLSv1.3

SSLEngine on

Again, it seems to have no effect whatsoever.

Obviously I have stop and restarted the server.

sudo /opt/lampp/lampp stop

sudo /opt/lampp/lampp start

Thanks for your help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

独孤求败 2025-01-20 13:35:05

解决了。

#
Listen 443

#added this line
SSLProtocol all -SSLv3 -SSLv2 -TLSv1 -TLSv1.1

到 /opt/lampp/etc/extra/httpd-ssl.conf

Solved.

#
Listen 443

#added this line
SSLProtocol all -SSLv3 -SSLv2 -TLSv1 -TLSv1.1

to /opt/lampp/etc/extra/httpd-ssl.conf

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文