Apache does not support SSI by default. How to add SSI support to Apache

  • 2020-05-09 19:48:10
  • OfStack

What is SSI?

SSI is an abbreviation of Server Side Includes, which translates into Chinese as server-side inclusion. Technically, SSI is a command or pointer that can be invoked from the comment line in an HTML file. SSI has powerful functions. With a simple SSI command, you can update the content of the entire website, dynamically display the time and date, and execute complex functions such as shell and CGI scripts.

Apache does not support SSI by default, so we need to change httpd.conf to configure it. Taking Apache 2.0.x of windows platform as an example, I open httpd.conf file in conf directory and search for "AddType text/ html.shtml". The search results are as follows:

# AddType text/html .shtml
# AddOutputFilter INCLUDES .shtml

Get rid of the # in front of these two lines.

Then search for "Options Indexes FollowSymLinks"
Add "Includes" after the first line found
Change the bank to Options Indexes FollowSymLinks Includes

Save httpd.conf and restart apache. This completes the setup of Apache SSI.

Related articles: