Hi

thanx a lot for your response. I have made the following modification to the
apache2.conf file so that i can use SSI using the ErrorDocument:

   Alias /error/ "/usr/share/apache2/error/"

   <Directory "/usr/share/apache2/error">
        AllowOverride None
        Options MultiViews +IncludesNoExec FollowSymLinks
    AddType text/html .shtml
    <FilesMatch "\.shtml[.$]">
        SetOutputFilter INCLUDES
    </FilesMatch>
        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 403 /error/HTTP_FORBIDDEN.shtml

In the /HTTP_FORBIDDEN.shtml file i have something like

<HTML>

<HEAD>

<TITLE>403 Forbidden</TITLE>

</HEAD>

<BODY>

<H1>Forbidden</H1>

<HR>

You do not have permission to perform the requested action.

There is either potential harm or the directory is read-protected.

<P>



Your IP address is <!--#echo var="REMOTE_ADDR" --><br>

<HR>

</BODY>

</HTML>

This is just for educational purposes and i am experimenting.

Thank you

OM Raesima

On Mon, Mar 10, 2008 at 2:59 PM, Joshua Slive <[EMAIL PROTECTED]> wrote:

> On Mon, Mar 10, 2008 at 10:53 AM, Oteng Michael Raesima
> <[EMAIL PROTECTED]> wrote:
> > Good day to you all
> >
> > Im am newbie to Apache but will try and explain my problem as much as i
> can.
> > I have a localhost Apache installation. I am trying to implement custom
> > error messages returned to the client. Example, I would like to display
> my
> > own 403
> >  forbidden error message when a user tries to access restricted content.
> In
> > this message i would like to display the client's
> >  IP address and maybe time of access.
> >
> > I tried to follow the SSI document in Apache website but i still cannot
> get
> > the values for these parameters. Could anyone please
> >  help.
>
> Show us what you've done so far. Remember that the variables need to
> have REDIRECT_ prepended:
> http://httpd.apache.org/docs/2.2/custom-error.html
>
> Joshua.
>
> ---------------------------------------------------------------------
> 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: [EMAIL PROTECTED]
>   "   from the digest: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to