403 question

403 question

Post by D. Alvara » Fri, 04 Jul 2003 05:40:11



I have used the "ErrorDocument 403" directive in my httpd.conf file
(of Apache 1.3.27) to point to a dynamci, JSP file.  I would like to
be able to say in that file, "You are forbidden access to
/path_you_accessed/page."  Is there a setting in Apache to allow you
to retain the headers from the request that caused the 403, thus
allowing the 403 page to know what caused/called it?

Thanks - Dave

 
 
 

403 question

Post by Keith Kelle » Fri, 04 Jul 2003 06:06:15


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> I have used the "ErrorDocument 403" directive in my httpd.conf file
> (of Apache 1.3.27) to point to a dynamci, JSP file.  I would like to
> be able to say in that file, "You are forbidden access to
> /path_you_accessed/page."  Is there a setting in Apache to allow you
> to retain the headers from the request that caused the 403, thus
> allowing the 403 page to know what caused/called it?

Read the documentation for the ErrorDocument directive, in
particular the docs about custom responses and the environment
variables Apache sets.

- --keith

- --

(try just my userid to email me)
alt.os.linux.slackware FAQ:  http://wombat.san-francisco.ca.us/cgi-bin/fom

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAj8DSUYACgkQhVcNCxZ5ID/GxQCeKXPpCsZifqOOcxQmshG+kYcS
jZcAniryLPBRYD/fjmp6JDbr7o8xEJzA
=MQqn
-----END PGP SIGNATURE-----

 
 
 

403 question

Post by Andreas Paasc » Fri, 04 Jul 2003 06:18:40



> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1



>> I have used the "ErrorDocument 403" directive in my httpd.conf file
>> (of Apache 1.3.27) to point to a dynamci, JSP file.  I would like to
>> be able to say in that file, "You are forbidden access to
>> /path_you_accessed/page."  Is there a setting in Apache to allow you
>> to retain the headers from the request that caused the 403, thus
>> allowing the 403 page to know what caused/called it?

> Read the documentation for the ErrorDocument directive, in
> particular the docs about custom responses and the environment
> variables Apache sets.

> - --keith

> - --

> (try just my userid to email me)
> alt.os.linux.slackware FAQ:  http://wombat.san-francisco.ca.us/cgi-bin/fom

> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: For info see http://www.gnupg.org

> iEYEARECAAYFAj8DSUYACgkQhVcNCxZ5ID/GxQCeKXPpCsZifqOOcxQmshG+kYcS
> jZcAniryLPBRYD/fjmp6JDbr7o8xEJzA
> =MQqn
> -----END PGP SIGNATURE-----

Your solution is to find the server generated variables and use them, these
are easily imbedded in any HTML page.

Using SSI code, these are - briefly:

Document Name: <!--#echo var="document_name" --><br>
Document URI: <!--#echo var="document_uri" --><br>
Local Date: <!--#echo var="date_local" --><br>
GMT Date: <!--#echo var="date_gmt" --><br>
Last Modified: <!--#echo var="last_modified" --><br>
Server Software: <!--#echo var="server_software" --><br>
Server Name: <!--#echo var="server_name" --><br>
Server Protocol: <!--#echo var="server_protocol" --><br>
Server Port: <!--#echo var="server_port" --><br>
Gateway Interface: <!--#echo var="gateway_interface" --><br>
Request Method: <!--#echo var="request_method" --><br>
Script Name: <!--#echo var="script_name" --><br>
Remote Host: <!--#echo var="remote_host" --><br>
Remote Address: <!--#echo var="remote_addr" --><br>
Remote User: <!--#echo var="remote_user" --><br>
Content Type: <!--#echo var="content_type" --><br>
Content Length: <!--#echo var="content_length" --><br>
HTTP Accept: <!--#echo var="http_accept" --><br>
HTTP User Agent (Browser): <!--#echo var="http_user_agent" --><br>
HTTP Cookie: <!--#echo var="http_cookie" --><br>
Unescaped query string: <!--#echo var="query_string_unescaped" --><br>
Query String: <!--#echo var="query_string" --><br>
Path Info: <!--#echo var="path_info" --><br>
Path Translated: <!--#echo var="path_translated" --><br>
Referer: <!--#echo var="referer" --><br>
Forwarded: <!--#echo var="forwarded" --><br>

HTH,

/Andreas

--
Registeret Linux user #292411

 
 
 

403 question

Post by D. Stuss » Fri, 04 Jul 2003 13:14:48




> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1

Please don't add that *to posts.  People really don't care if it's you.
Reserve it for your e-mail.



> >> I have used the "ErrorDocument 403" directive in my httpd.conf file
> >> (of Apache 1.3.27) to point to a dynamci, JSP file.  I would like to
> >> be able to say in that file, "You are forbidden access to
> >> /path_you_accessed/page."  Is there a setting in Apache to allow you
> >> to retain the headers from the request that caused the 403, thus
> >> allowing the 403 page to know what caused/called it?

> > Read the documentation for the ErrorDocument directive, in
> > particular the docs about custom responses and the environment
> > variables Apache sets.

> Your solution is to find the server generated variables and use them, these
> are easily imbedded in any HTML page.

> Using SSI code, these are - briefly:

> Document Name: <!--#echo var="document_name" --><br>
> Document URI: <!--#echo var="document_uri" --><br>
> Local Date: <!--#echo var="date_local" --><br>
> GMT Date: <!--#echo var="date_gmt" --><br>
> Last Modified: <!--#echo var="last_modified" --><br>
> Server Software: <!--#echo var="server_software" --><br>
> Server Name: <!--#echo var="server_name" --><br>
> Server Protocol: <!--#echo var="server_protocol" --><br>
> Server Port: <!--#echo var="server_port" --><br>
> Gateway Interface: <!--#echo var="gateway_interface" --><br>
> Request Method: <!--#echo var="request_method" --><br>
> Script Name: <!--#echo var="script_name" --><br>
> Remote Host: <!--#echo var="remote_host" --><br>
> Remote Address: <!--#echo var="remote_addr" --><br>
> Remote User: <!--#echo var="remote_user" --><br>
> Content Type: <!--#echo var="content_type" --><br>
> Content Length: <!--#echo var="content_length" --><br>
> HTTP Accept: <!--#echo var="http_accept" --><br>
> HTTP User Agent (Browser): <!--#echo var="http_user_agent" --><br>
> HTTP Cookie: <!--#echo var="http_cookie" --><br>
> Unescaped query string: <!--#echo var="query_string_unescaped" --><br>
> Query String: <!--#echo var="query_string" --><br>
> Path Info: <!--#echo var="path_info" --><br>
> Path Translated: <!--#echo var="path_translated" --><br>
> Referer: <!--#echo var="referer" --><br>
> Forwarded: <!--#echo var="forwarded" --><br>

An incomplete "story" but enough to get one started.

When reading the manual (and yes - RTFM), note also the use of variables which
start "Redirect_"... and why they exist.

 
 
 

403 question

Post by Keith Kelle » Sat, 05 Jul 2003 00:42:58


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



>> > -----BEGIN PGP SIGNED MESSAGE-----
>> > Hash: SHA1

> Please don't add that *to posts.  People really don't care if it's you.
> Reserve it for your e-mail.

Please don't complain about that *in my posts.  People really
don't care if you don't care that it's me.  Reserve it for your
killfile.



>> >> I have used the "ErrorDocument 403" directive in my httpd.conf file
>> >> (of Apache 1.3.27) to point to a dynamci, JSP file.  I would like to
>> >> be able to say in that file, "You are forbidden access to
>> >> /path_you_accessed/page."  Is there a setting in Apache to allow you
>> >> to retain the headers from the request that caused the 403, thus
>> >> allowing the 403 page to know what caused/called it?

>> > Read the documentation for the ErrorDocument directive, in
>> > particular the docs about custom responses and the environment
>> > variables Apache sets.

[snip inappropriate answer from Andreas]

Quote:> An incomplete "story" but enough to get one started.

> When reading the manual (and yes - RTFM), note also the use of variables which
> start "Redirect_"... and why they exist.

Which happens to be in the docs for the ErrorDocument
directive, in particular the link about custom responses.

- --keith

- --

(try just my userid to email me)
alt.os.linux.slackware FAQ:  http://www.veryComputer.com/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.veryComputer.com/

iEYEARECAAYFAj8ETwEACgkQhVcNCxZ5ID8MKACeNKhzaJFyqBn186qTdVcAoPno
53oAniGJspQlB4MGxRNF092N3z995N8c
=ge8K
-----END PGP SIGNATURE-----

 
 
 

1. upgrade XFree 336 to 403 and other kinda newbie questions

Hi all, hope you can help me...

After a few years of linux use I decided a couple of days ago to try Freebsd
4.3... Install went fine, got my adsl connection going with mpd-netgraph,
updated my ports collection with cvsup (read the question about the INDEX
file not being updated, so I'll do that in a few minutes) installed apache
and other apps through ports etc etc... I really like it :-)

Now for some questions.

-XFree86 3.3.6 is running now and just for the fun of it I'd like to install
4.0.3. I looked around on google and found a page about upgrading... What
that guy did was remove all packages that depended on X and then removed X
itself. After that he did a make install etc etc. Also changed make.conf (I
think) so any X dependend apps would not try to install 3.3.6 again. What he
didn't explain was: HOW he removed all packages that depend on X. Anybody
have some tips ? The handbook is not clear (chapter nog complete) about the
package system. How did he find out which packages depend on X that are
installed ??? Has anybody got a clue about the 'right' way to upgrade? Maybe
a link?

-Another thing... When I compile from the ports collection, can I remove it
with the package system ?

-Anybody know a good tutorial about the ins and outs of the package system
and how to use it? (except for the manpages ofcourse) As I said... Handbook
chapter is not complete.

-I updated my ports collection with cvsup... all went well. It didn't update
the things (language specific) I put into the refuse file. But the
directories remained... I guess that is the way it should be... So I removed
the dirs manually (e.g. rm -rf /usr/ports/japanese ). Was that the right
thing to do? I'd like to update my docs as well with cvsup and have the same
thing there... Language specific things are installed there as well and
should I remove those dirs manually as well or are these seperate packages
that I can remove using the package system? ... hmmm maybe I should read
those manpages again... ;-)

-Finally... When compiling from the ports collection... does this optimize
for my architecture (586)? Or do I have to change the makefile or some other
thing?

Ok... I know... I could just reinstall... but this way I learn a lot more...
after all these things are done I'll try the make world thing... or whatever
it was... That is building everything you have installed again using sources
or building everything ? I'll look that up... I start to sound like a
complete idiot here probably ;-)

Oh... wait... just another thing... was trying to do a make && make install
&& make clean for lynx ... it exited error 1 .. same with lynx-current.....
is that a problem with INDEX not rebuild yet or what ???

Thanx

MarsDude

2. Changing timeout period on Default Screensaver

3. 403 Forbidden you don't have access to / on this server.....

4. ext2 partition

5. 403 Error for relative paths in Apache 1.3.3

6. Installing NetBsd Sparc64 from a FreeBSD intel server

7. 403 forbidden error with apache when symlinking to different partition

8. adding a secondary group doesnt seem to work

9. 403 forbiden cgi-bin (newbie)

10. Apache 1.3.19 return 403 Forbidden on PDF file

11. Forbidden 403 Error

12. spurious 403 response

13. apache user dirs 403 forbidden w/redhat 5.0