How to Enable HTTP/2 in Apache 2.4 on Ubuntu 22.04
To enable HTTP/2 in Apache 2.4 on Ubuntu 22.04, you can follow these steps:
1. Update your system:
sudo apt update
2. Install Apache 2.4 with SSL support and HTTP/2 module:
sudo apt install apache2
sudo apt install libapache2-mod-http2
3. Enable the necessary modules:
sudo a2enmod http2
sudo a2enmod ssl
4. Configure your virtual hosts:
Edit the Apache configuration file for your virtual host(s) where you want to enable HTTP/2. Typically, the configuration file is located at /etc/apache2/sites-available/your_virtual_host.conf. Add the following lines inside the <VirtualHost> block:
Protocols h2 http/1.1
5. Configure SSL/TLS:
Edit the SSL configuration file located at /etc/apache2/mods-available/ssl.conf. Make sure the following line is present and not commented out:
SSLProtocol -all +TLSv1.2 +TLSv1.3
6. Restart Apache:
sudo systemctl restart apache2
After following these steps, HTTP/2 should be enabled on your Apache 2.4 server running on Ubuntu 22.04. You can verify it by checking the response headers of your website using a browser developer tool or an online HTTP/2 checker tool.
'Linux Distributions' 카테고리의 다른 글
How to Install Webalizer on CentOS 8 (0) | 2023.07.02 |
---|---|
How to Install Apachetop on CentOS 7 (0) | 2023.06.29 |
How to install the latest version of influxdb on Ubuntu (0) | 2023.06.21 |
How to install and configure chrony (0) | 2023.06.20 |
How to set or change timezone on Ubuntu (0) | 2023.06.19 |