I was always sceptical on switching to NGINX by cPanel and always had extremely slow scores when doing so when testing with Google PageSpeed Insights and GTMetrix
however this morning I decided to switch again and followed the following tutorial. Note I am using Apache MPM Event, NGINX Proxy and Lsapi as the handler
Never got scores higher than 96/100 with Litespeed but today we got 99/100 and a 1 second drop in load time.
We did the following.
Enabled HTTP2:
Procedure
To enable this globally, add a new file ending in .conf such as http2.conf to the Nginx configuration folder located in /etc/nginx/conf.d and add the following contents.
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
}
Save the file and verify the Nginx configuration. Then, restart Nginx as well as PHP-FPM.
nginx -t
/scripts/restartsrv_nginx ; /scripts/restartsrv_apache_php_fpm
Then Enabled Compression:
Edited:
/etc/nginx/nginx.conf
gzip on;
gzip_types text/plain text/css text/javascript text/xml image/x-icon image/svg+xml application/rss+xml application/javascript application/x-javascript application/xml application/xhtml+xml application/x-font application/x-font-truetype application/x-font-ttf application/x-font-otf application/x-font-opentype application/vnd.ms-fontobject font/ttf font/otf font/opentype;
gzip_proxied no-cache no-store private expired auth;
gzip_min_length 1000;
Then restarted some services
/scripts/restartsrv_nginx
/scripts/restartsrv_httpd
/scripts/restartsrv_apache_php_fpm
And site got scored in Gtmetrix with A from C and a load speed of 1.4 to 2seconds compared to 2.8 and 4.1 in some instances.
Seems much better.
Will be monitoring it but so far no issues with wordpress plugins nor WHMCS and it dashboard feels better.
Will inform you guys if we notice any issues or a change. But so far so good.
however this morning I decided to switch again and followed the following tutorial. Note I am using Apache MPM Event, NGINX Proxy and Lsapi as the handler
Never got scores higher than 96/100 with Litespeed but today we got 99/100 and a 1 second drop in load time.
We did the following.
Enabled HTTP2:
Procedure
To enable this globally, add a new file ending in .conf such as http2.conf to the Nginx configuration folder located in /etc/nginx/conf.d and add the following contents.
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
}
Save the file and verify the Nginx configuration. Then, restart Nginx as well as PHP-FPM.
nginx -t
/scripts/restartsrv_nginx ; /scripts/restartsrv_apache_php_fpm
Then Enabled Compression:
Edited:
/etc/nginx/nginx.conf
gzip on;
gzip_types text/plain text/css text/javascript text/xml image/x-icon image/svg+xml application/rss+xml application/javascript application/x-javascript application/xml application/xhtml+xml application/x-font application/x-font-truetype application/x-font-ttf application/x-font-otf application/x-font-opentype application/vnd.ms-fontobject font/ttf font/otf font/opentype;
gzip_proxied no-cache no-store private expired auth;
gzip_min_length 1000;
Then restarted some services
/scripts/restartsrv_nginx
/scripts/restartsrv_httpd
/scripts/restartsrv_apache_php_fpm
And site got scored in Gtmetrix with A from C and a load speed of 1.4 to 2seconds compared to 2.8 and 4.1 in some instances.
Seems much better.
Will be monitoring it but so far no issues with wordpress plugins nor WHMCS and it dashboard feels better.
Will inform you guys if we notice any issues or a change. But so far so good.