Re: .cgi with ModPerl

2002-06-30 Thread Rendhalver [Peter Brown]

 ebay == ebay  Jeff writes:

ebay I am setting up a server so that all my scripts have .cgi extentions.
ebay It would be nice if I could just add some directives in the httpd.conf
ebay that will have all my virtual hosts use modPerl for any files with
ebay either a .pl or a .cgi extention.  The reason I prefer this method is
ebay that I have a couple scripts that I load in my httpdocs directory (the
ebay site home page is a script) So this is what I did:

ebay Commented out: AddHandler cgi-script .cgi

ebay Added the following:

ebay IfModule mod_perl.c
ebay Files ~ (\.pl|\.cgi)
ebay SetHandler perl-script
ebay PerlHandler Apache::PerlRun
ebay Options +ExecCGI
ebay allow from all
ebay PerlSendHeader On
ebay /Files
ebay /IfModule

try FilesMatch instead and see if that works

ebay What I found is that when I only had this code only outside of the
ebay VirtualHost configurations, my test script indicated .pl was running in
ebay modPerl but .cgi wasn't.  I only could get .cgi to run in mod_Perl by
ebay copying this code inside of each of the VirtualHost configurations.

ebay Obviously I'm not an Apache config expert but one thing that also struck
ebay me strange is that while this code clearly indicates how to handle .pl
ebay and .cgi file extentions, prior to adding this, I could not find
ebay anywhere in httpd.conf where it maps .cgi files in this same way.  The
ebay only code I could find is AddHandler cgi-script .cgi but shouldn't there
ebay be some additional corresponding code like PerlHandler Appache::Mod_CGI,
ebay Options +ExecCGI, etc.??  Also, how does appache know which module to
ebay use for ScriptAlias directories?  I left the ScriptAlias directives in
ebay for the cgi-bin director and didn't change them to just Alias directives
ebay and it works fine but I guess that means a filematch directive overrides
ebay a ScriptAlias directive?

ebay A bit confused.  Anyway, is the above method for achieving what I want
ebay an acceptable and secure/safe way to handle it?

ebay Thanks


-- 
 XEmacs Advocate | I've seen things you people wouldnt believe.
 FreeBSD Devote  | Attack ships on fire of the shores of orion ...
 Perl Hacker | All those moments will be lost in time, 
 Apache God  | like tears in the rain. Time to die.. roy batty - bladerunner



digest authentication

2000-11-07 Thread rendhalver

hi guys
this is probaly OT
but does anyone know which browsers support digest auth ??
im just have written a mod_perl authentication module and was intending to 
convert it to use digest auth
if anyone could point me at a url that could tell me that would be good

thanks in advance

Rendhalver

I've seen things...
seen things you little people wouldn't believe...
Attack ships on fire off the shoulder of Orion bright as magnesium...
I rode on the back decks of a blinker and watched c-beams glitter in the 
dark near the Tanhauser Gate.
all those moments... they'll be gone.

Roy Batty, Bladerunner





Restricting dir contents per user

2000-10-09 Thread rendhalver

i sent this before but got no reply
anyone have any idea if this can be done ??

hi guys
got a query that may be easy to solve maybe not

i am working on a project in mod_perl and php
we are intending to use mod_dav as a publishing tool
i have written a custom auth module for determining publish rights
i was wondering if it is possible to restrict what a user sees in a 
directory based on his publish rights
for example
the root directory contains DIR1 DIR2 DIR3 DIR4
user1 is allowed to publish to DIR1 and DIR2
user1 only sees DIR1 and DIR2 in his DAV client

any ideas ??

thanks in advance

Rendhalver 




estricting dir contents per user

2000-10-05 Thread rendhalver

hi guys
got a query that may be easy to solve maybe not

i am working on a project in mod_perl and php
we are intending to use mod_dav as a publishing tool
i have written a custom auth module for determining publish rights
i was wondering if it is possible to restrict what a user sees in a 
directory based on his publish rights
for example
the root directory contains DIR1 DIR2 DIR3 DIR4
user1 is allowed to publish to DIR1 and DIR2
user1 only sees DIR1 and DIR2 in his DAV client

any ideas ??

thanks in advance

Rendhalver