Jump to content

PHP 7.1 - PHP-FPM and Caching on WHM/cPanel


Recommended Posts

Posted
55 minutes ago, Vanucci said:

Thanks guys, followed this and my sites working faster than usual

 

Expired headers, no idea how to manually do this in the htaccess file

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 2 days"
</IfModule>
## EXPIRES CACHING ##

 

Add this to your htaccess for example. You can also find a free example htaccess file here in the marketplace. I can't find the link right now.

  • Replies 64
  • Created
  • Last Reply
Posted
1 hour ago, Vanucci said:

Thanks guys, followed this and my sites working faster than usual

 

Expired headers, no idea how to manually do this in the htaccess file

It is easy, you need to install a php module and add some lines to .htaccess.  Unless someone else does I will give the information about it later ( Since I dont have access to it ). Besides I will give detailed information how I have made the latest setup that I am able to make the site faster than it was before.

Posted
1 hour ago, marklcfc said:

I've got this

mpm.png.120098e17958e1b9ea1e89a2dcbbb7df.png

Should I be using mod_mpm_worker instead?

It is said that prefork is the default for Apache 2.4. It changes on your config which you should choose. I am running prefork and others run event and may be others run worker.

The difference can be found in following link. Not very clear to understand though if you are not an expert ( not for me either :) )

http://stackoverflow.com/questions/13883646/apache-prefork-vs-worker-mpm

  • 3 weeks later...
Posted

Prefork is the best option if you run php on DSO.

If you are running php-fpm, I read that event would be the best.

But you will have to test on your environment.

Posted
On 3/21/2017 at 10:32 AM, inkredible said:

Yeah maybe we can actually find a group of WHM/Cpanel + IPS users. I think most of us have the same requirements (aka just a few, big and selfowned sites hosted with CPanel) which might be helpful sometimes (for example when it comes to optimizations for the servers).

Count me in

Posted
43 minutes ago, CheersnGears said:

I have finally gotten mine set up to a speed that I think is acceptable. What really put it over the top was putting in HTTP2.  That alone made such a huge difference.

Are you using it on EA4? 

Posted
4 hours ago, ABGenc said:

Are you using it on EA4? 

I think he is, it's in pre release at the moment. Some people reported bugs though, so be careful when trying http2 :-).

5 hours ago, CheersnGears said:

I have finally gotten mine set up to a speed that I think is acceptable. What really put it over the top was putting in HTTP2.  That alone made such a huge difference.

Interessting, do you have numbers? I know it's especially helpful for pages with a lot of requests (for example pages who don't use sprites for icons and similiar)

Posted
6 hours ago, ABGenc said:

Are you using it on EA4? 

I'm using it with EA4 but not through EA4 using the Cloud Linux experimental repository .   Get that installed, drop a conf file in your apache, and restart. It's one of those things that, for me at least, just runs.  According to WebpageSpeedTest it cut my page load times in half (my article pages are very heavy)

  • 2 weeks later...
Posted
On 20.04.2017 at 6:02 PM, ASTRAPI said:

For cpanel servers phpfpm using event is the best option :-)

That is what I have opted after opcache issue. In this setup is it normal to have nobody to be owner of  httpd processes ?

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...