Re: SSI help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <joshua@xxxxxxxx> wrote:
On Mon, Mar 10, 2008 at 10:53 AM, Oteng Michael Raesima
<mikebafana@xxxxxxxxx> 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: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux