You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Iain Cunningham <ia...@architecta.co.uk> on 2004/01/16 11:41:03 UTC

[users@httpd] How to get SSIs working

I have Apache 2.0.48 running on an intranet based Windows 2000 server
for testing websites prior to publishing them on our main internet
server.  I am having a little difficulty getting SSIs to work and I
can't work out why.  What I am trying to do is use the internationalised
error pages supplied with Apache (unaltered), but for some reason, it's
just not working.

All normal pages (no SSI directives) are served correctly by the server,
but for some reason, the error pages (containing the SSI directives) are
not behaving as they should - the internationalised content is correctly
displayed, but the SSIs aren't followed.  So instead, for example, of
seeing something like:

    The requested URL was not found on this server.
    If you entered the URL manually please check your spelling and try
again.

    Error

I see:

    The requested URL was not found on this server. The link on the
">referring page seems to be wrong or outdated. Please inform the author
of ">that page about the error. If you entered the URL manually please
check your spelling and try again. 

So none of the if or else statements are evaluated and also, none of the
#includes are inserted.

My httpd.conf section related to the handling of errors is attached
below.  For info, DocumentRoot is "e:/websites/intranet/" and the error
files are located in "e:/websites/intranet/error", with the path to the
included files as given in the Alias statement below.  None of the
directories in the site contains an .htaccess file.

Does anyone have any ideas where I've gone wrong?

Best regards,

Iain Cunningham


Alias /error/include/ "/error/includes/"

<Directory "/error">
    AllowOverride None
    Options IncludesNoExec +Includes
    AddOutputFilter Includes html
    AddHandler type-map var
    Order allow,deny
    Allow from all
    LanguagePriority en cs de es fr it nl sv pt-br ro
    ForceLanguagePriority Prefer Fallback
</Directory>

ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
ErrorDocument 410 /error/HTTP_GONE.html.var
ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] How to get SSIs working

Posted by Iain Cunningham <ia...@architecta.co.uk>.
> -----Original Message-----
> From: Iain Cunningham [mailto:iain.cunningham@architecta.co.uk] 
> Sent: 16 January 2004 10:41
> To: users@httpd.apache.org
> Subject: [users@httpd] How to get SSIs working
>
> [...]
> 
> <Directory "/error">

<sheepish>

Changing "/error" to "e:/websites/intranet/error" would, of course, fix
all my problems!

Doh!

</sheepish>

Iain


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org