2005-02-18, 09:34 PM
Hi all,
I have been looking into how to get SSI working on Apache 2 in Fedora core 3. Well I managed
to get it work after about 30 minutes ;)
The first task I did was look at my mod_userdir which is shwon below:
Code:
<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
The above shows by default SSI is disabled, if you delete IncludeNoExec
and replace it with +Includes this will turn SSI on so your config should not look like:
Code:
<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch +Includes
<Limit GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
Once that was done I created a test file to make sure SSI was working correctly. The HTML
I used was the following:
Code:
<HTML>
<BODY>
<!--#echo var="HTTP_USER_AGENT"-->
</body>
</html>
This displayed Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041111 Firefox/1.0
and SSI was working. the file extension that is used for SSI was .shtml so your index.html would
have to be called index.shtml if it included SSI.
Well thats it setup enjoy messing with SSI ;)