(html) Server Side Includes for Apache2 HowTo
Luca Roversi

Table of Contents

1
2

1 Modifying userdir.conf

Ubuntu Linux installs Apache2 configuration files in /etc/apache2 directory, where the two following directories are located:

  • mods_available, which contains the modules that Apache2 may load, if instructed for so doing;

  • mods_enabled, which contains links to the modules in mods_available that are effectively loaded.

Edit mods_available/userdir.conf and let it be equal to:
   
     <IfModule mod_userdir.c>
        UserDir public_html
        UserDir disabled root

        <Directory /home/*/public_html>
         AddType text/html .html
         AddOutputFilter INCLUDES .html
                AllowOverride FileInfo AuthConfig Limit
                Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
                Options +Includes
        </Directory>
     </IfModule>
    
 

Notice that the types for which INCLUDES filter works have extension html, and not .shtml. But it is exactly what I am interested to, since I have no speed issues on my laptop's web server.

2 Loading mods_available/include.load

mods_available/include.load is responsible for including server side includes.

Just write the link userdir.conf -> /etc/apache2/mods-available/userdir.conf in directory mods_enabled, by issuing:

      cd mods_enabled
      ln -s ../mods-available/include.load include.load