Translation - Μετάφραση
Resources, Technical Assistance and Technology News => Tips on Using Computers => Translator resources => Linux tips => Topic started by: spiros on 13 Apr, 2021, 19:04:36
-
Apache vs Cpanel's NGINX with Reverse Proxy
I was testing Cpanel's NGINX with Reverse Proxy (https://docs.cpanel.net/knowledge-base/web-services/nginx-with-reverse-proxy/) using Chrome's Lighthouse (https://developers.google.com/web/tools/lighthouse) (F12, select Lighthouse).
Installing nginx was easy, the only issue was that the server sites appeared down immediately after install, which was resolved with restarting nginx.
The Cpanel implementation of nginx offers very little in the manner of configuration, basically only enable/disable/clear cache for specific domains. No support for http2 (https://features.cpanel.net/topic/22057-http2-support-for-nginx), brotli (https://forums.cpanel.net/threads/gzip-brotli-compression-in-nginx.689061/post-2843425) (sample config (https://www.freecodecamp.org/news/powerful-ways-to-supercharge-your-nginx-server-and-improve-its-performance-a8afdbfde64d/)) or any further nginx cache configuration (https://www.nginx.com/blog/nginx-caching-guide/) and favicon (https://forums.cpanel.net/threads/ea-9692-favicon-not-showing-since-nginx-install.689057/) is currently not supported (https://support.cpanel.net/hc/en-us/articles/1500006916941) either.
I used two SMF forum pages for testing purposes: the index page and a topic page. Here are the results.
Index (https://www.translatum.gr/forum/index.php)
Metric | Apache | Nginx |
Performance | 99 | 65 |
Accessibility | 75 | 75 |
Best Practices | 87 | 87 |
SEO | 82 | 80 |
First Contentful Paint | 0.5 s | 1.7 s |
Speed Index | 0.6 s | 9.4 s |
Largest Contentful Paint | 0.9 s | 2.2 s |
Time to Interactive | 0.8 s | 1.7 s |
Total Blocking Time | 50 ms | 20 ms |
Cumulative Layout Shift | 0.074 | 0 |
Topic (https://www.translatum.gr/forum/index.php?topic=218935.0)
Metric | Apache | Nginx |
Performance | 90 | 93 |
Accessibility | 72 | 72 |
Best Practices | 73 | 73 |
SEO | 92 | 91 |
First Contentful Paint | 0.6 s | 1.1 s |
Speed Index | 0.8 s | 1.1 s |
Largest Contentful Paint | 0.7 s | 1.2 s |
Time to Interactive | 1.3 s | 1.6 s |
Total Blocking Time | 290 ms | 90 ms |
Cumulative Layout Shift | 0.074 | 0.074 |
Attached the actual tests
Engintron appears to be an alternative solution favoured by many (https://applications.cpanel.net/listings/view/Engintron-Nginx-on-cPanel) as a Cpanel reverse proxy.