ssi
Apache2 Server Side Includes
Feb 16th
Server side includes allow for external html documents to be injected into a page prior to it rendering on the client web browser. The benifit of this is eliminating the need to repetitiously repeat code over and over again. If you include the same scripts, on each of your website pages, you can create an external html document and inject it using a server side include with a single line of code. If your using virtual host containers, you can include the server parameters directly in the file. Add the following directory block and make the directory path that of the virtual host block’s document root:
<Directory /var/www/*>
Options +Includes
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</Directory>
Make .shtml the extension of the files you are including. I think you can make it anything, I just used “.html”.
Then enable the module:
sudo a2enmod include
Reload apache2:
sudo /etc/init.d/apache2 restart
Then include external html files using:
<!-- #include virtual="/mrtg/file1.html" -->
