1. sudo a2enmod include
2. add the following to your config file in /etc/apache2/sites-available/000-default.conf (you might have changed this file's name)
Code: Select all
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
3. sudo apachectl restart or sudo systemctl restart apache2
4. Write some SSI includes
The above turns on two methods of showing documents with includes, either HTML documents with the .shtml extension or enabling the execution bit, XBitHack, on a regular HTML document (sudo chmod +x doc.html).
Another note, install the apache manual, it is very good and has the complete description on how to do this.
sudo apt update
sudo apt install apache2-doc
You can get to it with this address: http://localhost/manual