Key points
- enable http2 & change mpm prefork to event
- php-fpm
Enable http2
On apache + prefork to event – https://techwombat.com/enable-http2-apache-ubuntu-16-04/
sudo add-apt-repository ppa:ondrej/apache2sudo apt updatesudo apt upgradesudo apt install php7.0-fpmsudo a2enmod proxy_fcgi setenvifsudo a2enconf php7.0-fpmsudo a2dismod php7.0
sudo a2dismod mpm_preforksudo a2enmod mpm_eventsudo service apache2 restartsudo service php7.0-fpm restart
Add in <VirtualHost>… </VirtualHost> for individual site, or in apache.conf file, for global settings.
Protocols h2 h2c http/1.1
sudo a2enmod http2
sudo service apache2 restart
Nginx – Need to compile nginx with http2 module
./configure –with-compat –add-dynamic-module=../ModSecurity-nginx –with-http_ssl_module –with-stream_ssl_module –prefix=/etc/nginx –with-http_v2_module
** mod_security for nginx, follow this : https://www.nginx.com/blog/compiling-and-installing-modsecurity-for-open-source-nginx/
This post content is under development.. new content will be added in the future.