Enable Server Side Include (SSI) on Mac OS X

SSI on Ubuntu

To enable SSI on Debian Distribution (Ubuntu) is easy:

a2enmod include

SSI on Mac OS X

Mac OS X has no such command so that we have to manually modify the configuration files.

There are 2 ways to achieve this:

  1. Global Configuration

    • edit /etc/apache2/httpd.conf
    • Uncomment
      AddType text/html .shtml
      AddOutputFilter INCLUDES .shtml
  2. Per-User Configuration

    • edit /etc/apache2/users/username.conf
    • <Directory "/Users/username/Sites/">
      Options Indexes MultiViews Includes
      AllowOverride All
      Order allow,deny
      Allow from all
      AddType text/html .shtml
      AddOutputFilter INCLUDES .shtml

Then restart apache and all done. sudo apachectl restart


  1. Apache with virtual hosts, PHP and SSI on Mac OS X 10.6
Loading Facebook Comments ...

Leave a Reply

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