#Enable_HTTP/2 #Amazon #EC2 #Apache
Error Message:
"The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive."
Important:
- Take a backup of your conf files and folders before trying any the below commands.
- **** Your website should already be configured to run on https, else HTTP/2 will not work *****
Run the below command:
httpd -V | grep MPM
Output will be:
Server MPM: prefork
We are going to change this and start using event
Step 1:
httpd -v
Ensure your httpd version is greater than or equal to 2.4.37
Server version: Apache/2.4.37 (Amazon)
Step 2: Modify the 00_mpm.conf
cd /etc/httpd/conf.modules.d
vi 00-mpm.conf
Uncomment the following line:
LoadModule mpm_event_module modules/mod_mpm_event.so
and comment the below lines if they are enabled:
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
LoadModule mpm_worker_module modules/mod_mpm_worker.so
Save the file by pressing 'Esc' button :wq!
Run the below command:
httpd -V | grep MPM
Output will be:
Server MPM: event
Step 3:
cd /etc/httpd/conf
vim httpd.conf
Add the below lines to bottom of the page:
Protocols h2 http/1.1
Protocols h2 h2c http/1.1
Step 4:
sudo service httpd restart
sudo service mysqld restart
Step 5:
Ensure your website is still up and running without any issues
Check if HTTP/2 is successfully enabled using the below website:
https://http2.pro/Disclaimer: We are not held responsible if something goes wrong
Comments
Post a Comment