Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Web Server Configuration _ Can't get SSI to work on XP using Apache

Posted by: ajhb Mar 23 2007, 04:02 AM

Help! I'm going gray rapidly!!!

I've installed Apache 2 on Windows XP professional, but despite tweaking for hours and hours, I can't get SSIs to work.

The server itself is running, and I've successfully changed the directory, but get this error message every time I try the includes:

[an error occurred while processing this directive]

My syntax for the include looks fine <!--#include virtual="/ssi-test.shtml"-->

The changes I've made in the httpd file are as follows (shown in red)...

------------------------------------------------------------------------------------------------

DocumentRoot "D:/websites"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Satisfy all
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "D:/websites">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Multiviews Indexes SymLinksifOwnerMatch Includes ExecCGI

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None

#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all

</Directory>

----------------------------------------------------------------------------------------------------------------------

In addition, further down I've made amendments...

----------------------------------------------------------------------------------------------------------------------

# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
#AddHandler cgi-script .cgi

# For type maps (negotiated resources):
#AddHandler type-map var

#
# Filters allow you to process content before it is sent to the client.
#
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
AddHandler server-parsed .shtml .html .htm

--------------------------------------------------------------------------------------------------------------

Note that I've tried the above without the AddOutputFilter, and without the AddHandler, both with no success. Would appreciate it if anyone could shed some light on this.

Many thanks,
Adam.

Posted by: pandy Mar 23 2007, 11:55 AM

I only have 1.3 installed right now. There you should change the DocumentRoot in two places. I have a faint memory of that this may affect SSI, but I could remember wrong. It's a bit further down.

CODE
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "C:/path/to/dir">

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)