Programming Tutorials

How to check if mod_expires module is loaded?

By: Gren in Apache Tutorials on 2023-04-03  

To check if the mod_expires module is loaded and enabled in Apache, you can use the apachectl command-line utility with the -M option, which lists all the loaded Apache modules.

Here's how you can do it:

Open a terminal or command prompt window.

Type the following command:

apachectl -M | grep expires

This will list all the loaded Apache modules that contain the word "expires".

If the mod_expires module is loaded and enabled, you should see a line that looks like this:

expires_module (shared)

This indicates that the mod_expires module is loaded and enabled.

If the mod_expires module is not loaded or enabled, you can enable it by adding the following line to your Apache configuration file (httpd.conf or apache.conf):

LoadModule expires_module modules/mod_expires.so

Make sure to save the configuration file and restart Apache for the changes to take effect.






Add Comment

* Required information
1000

Comments

No comments yet. Be the first!

Most Viewed Articles (in Apache )

Latest Articles (in Apache)