• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Mod_expires and cache for website

P

pascalito

Guest
Hello i have plesk installed on my CentOS 5.2 server for my website. I have some trouble the website is slow on rushhour and i want to activate Cache system.

Mod_expires is installed and active i did everything fro this "tutorial" http://forums.theplanet.com/lofiversion/index.php/t78872.html

But it doesn't work...

What i did :

I created vhost.conf here :

/home/httpd/vhosts/mysite.com/conf/vhost.conf

and put this code inside :

# Enable and set default cache rule
ExpiresActive On
ExpiresDefault "access plus 0 minutes"

# images
ExpiresByType image/gif "modification plus 1 month"
ExpiresByType image/png "modification plus 1 month"
ExpiresByType image/jpeg "modification plus 1 month"

# html and text (Don't cache)
ExpiresByType text/html "access plus 0 minutes"
ExpiresByType text/plain "access plus 0 minutes"

# other types (Short cache)
ExpiresByType text/css "access plus 5 days"
ExpiresByType application/x-javascript "access plus 5 days"

But it doesn't work somebody have an idea or can help me with that ? Thanks !

my header info :
Server: Apache/2.2.3 (CentOS)
X-Powered-By: PHP/5.1.6
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
 
Back
Top