• 1-888-289-2246
  • 24x7x365 Presence

How to enable mod_expires and mod_headers on any H-Sphere controlled web server?


Steps:-
1. Go to the directory “/hsphere/shared/apache2/conf”

2. There will be 3 files :- httpd.conf, httpd.conf.tmpl and httpd.conf.tmpl.custom.
   If “httpd.conf.tmpl.custom” doesn’t exist, then make a copy of “httpd.conf.tmpl” as “httpd.conf.tmpl.custom”

3. Edit “httpd.conf.tmpl.custom” by copying lines from “mod_expires.so” and “mod_headers.so” as follows:

   The end result should look like this:

    LoadModule expires_module modules/mod_expires.so
    LoadModule headers_module modules/mod_headers.so
   
    LoadModule log_forensic_module modules/mod_log_forensic.so
    LoadModule expires_module modules/mod_expires.so
    LoadModule headers_module modules/mod_headers.so
    LoadModule ident_module modules/mod_ident.so
    LoadModule usertrack_module modules/mod_usertrack.so
   

4. Restart Apache forcefully by using the script below:-
   /hsphere/shared/scripts/apache-restart

5. That’s all.
   Check the web server’s phpinfo page and see whether mod_expires and mod_headers are enabled or not.

]]>


Leave a Reply

Your email address will not be published. Required fields are marked *