1. Confirm to load the include. so module and remove the comments:
LoadModule include_module libexec/apache2/mod_include.so
2. Remove the annotations in the AddType section:
AddType text/html. shtml
AddOutputFilter between des. shtml
3. Find the Directory permission
Options Indexes FollowSymLinks
Add the pair des:
Options Indexes FollowSymLinks Includes
4. Restart Apache and test:
<! -# Include file1_1_head.html "->
Holle Word !, This is intermediate content
<! -# Include fileenders into foot.html "->
The following is a supplement from other netizens:
What is SSI?
SSI is the abbreviation of Server Side encryption DES. Technically speaking, SSI is a command or pointer that can be called through the annotation line in an HTML file. SSI has powerful functions. You only need to use a simple SSI command to dynamically display the content update, time, and date of the entire website, and complex functions such as shell and CGI scripts.
How can your Apache server support SSI?
Apache does not support SSI by default. We need to change httpd. conf for configuration. Take Apache 2.0.x on windows as an example. Open the httpd. conf file in the conf directory and search "AddType text/html. shtml". The search result is as follows:Copy codeThe Code is as follows: # AddType text/html. shtml
# AddOutputFilter between des. shtml
Remove # from the front of the two rows.
Search "Options Indexes FollowSymLinks"
Add "des" after the row to be searched"
Change this row to Options Indexes FollowSymLinks Includes
Save httpd. conf and restart apache.
Now we have completed the configuration of Apache SSI.