XAMPP how to load mod_expires

I have XAMPP and I can see the mod_expires.so file in the path

... XAMPP \ Apache \ modules \ mod_expires.so

However, I believe that the module does not load for two reasons:

first: mod_expires not specified when phpinfo () is called

Secondly, I add cache timeouts to the .htaccess file. I get 500 server errors.

(Sample cache code inside .htaccess

<IfModule mod_expires.c> # Activate mod_expires for this directory ExpiresActive on #HTML documents are good for a week from the time they were changed ExpiresDefault M604800 </IfModule> 

TWO QUESTIONS THEN:

Is there a mod_expires.so file indicating that the module is installed?

If YES, how do I enable or activate?

If NOT, how do I install and enable in XAMPP?

Thanks,

+8
xampp mod-expires
source share
1 answer

To load the expires module, assuming it is part of the XAMPP package, we need to undo the LoadModule comment from the apache configuration file.

First check that the XAMPP package has a module:

go to C: \ XAMPP \ apache \ module and find the mod_expires.so file

If you have this file, go to C: \ XAMPP \ apache \ conf \ httpd.conf and find "mod_expires.so"

You will see

 #LoadModule expires_module modules/mod_expires.so 

do not comment on this line to have

 LoadModule expires_module modules/mod_expires.so 

Reset server

+17
source share

All Articles