Apache Showing Incorrect SSL Packet Length and Wrong Version Number on Ubuntu 24.04
After installing a new VPS with Ubuntu 24.04, Apache, and PHP, and adding SSL using the standard provided SSL configuration in /etc/apache2/sites-available/default-ssl.conf, you may encounter an issue where Apache is showing an incorrect SSL packet length and wrong version number.
Understanding the Issue
This issue is caused by a known bug in OpenSSL version 1.0.2, which is the version that comes pre-installed with Ubuntu 24.04. The bug causes Apache to incorrectly report the SSL packet length and version number, which can lead to issues with SSL handshakes and connections.
Fixing the Issue
To fix this issue, you will need to upgrade OpenSSL to the latest version. Here are the steps to do so:
Add the ppa:ondrej/php repository to your system:
sudo add-apt-repository ppa:ondrej/phpUpdate your package lists:
sudo apt-get updateUpgrade OpenSSL:
sudo apt-get upgrade opensslRestart Apache:
sudo systemctl restart apache2
Testing the Fix
After upgrading OpenSSL and restarting Apache, you can test the fix by running an SSL test using a tool like SSL Labs' SSL Server Test. If the issue has been fixed, you should see that the SSL packet length and version number are now being reported correctly.
The issue of Apache showing an incorrect SSL packet length and wrong version number on Ubuntu 24.04 is caused by a known bug in OpenSSL version 1.0.2. To fix this issue, you will need to upgrade OpenSSL to the latest version. By following the steps outlined in this article, you can upgrade OpenSSL and resolve the issue, ensuring that your Apache server is able to properly handle SSL connections.
References
In this article, we covered the issue of Apache showing an incorrect SSL packet length and wrong version number on Ubuntu 24.04. We discussed the cause of the issue, which is a known bug in OpenSSL version 1.0.2, and provided steps to fix the issue by upgrading OpenSSL to the latest version. We also provided a reference to SSL Labs' SSL Server Test for testing the fix. By following the steps outlined in this article, you can resolve the issue and ensure that your Apache server is able to properly handle SSL connections.