LameNerd has asked for the wisdom of the Perl Monks concerning the following question:

Oh wise Monks,
I am learning about mod_perl. I have a web hosting account.
And when I dump the environment via a cgi.
I see this:
SERVER_SOFTWARE=Apache/2.0.46 (Unix) mod_perl/1.99_09 Perl/v5.8.0 mod_ +ssl/2.0.46 OpenSSL/0.9.6g DAV/2 FrontPage/ PHP/4.3.2 mod_gz +ip/
So I assume "they" support mpd_perl. Right?
So my question is where do I put stuff like ...
The configuration file entry that goes with it <Location /protected> AuthName Test AuthType Basic PerlAuthenHandler Apache::AuthAny require valid-user </Location>
The above I got from this link.
Is time for my cheap-self to buy a book? Any recommendations?

edited: Tue Jun 17 20:49:25 2003 by jeffa - s/pre/code/g - square brackatized the url

Replies are listed 'Best First'.
Re: mod_perl configuration file entries?
by benn (Vicar) on Jun 17, 2003 at 22:14 UTC
    Although ScooterQ is correct about the 'Location' directive, all the directives you have *inside* there can also be used in a .htaccess file (placed inside the directory you wish to protect - all described in the above-linked Apache docs if you're not .htaccess-savvy).

    Cheers, Ben.

Re: mod_perl configuration file entries?
by ScooterQ (Pilgrim) on Jun 17, 2003 at 19:50 UTC
    According to the Apache 2.0 docs the location directive only works within the following contexts: server config, virtual host. Both of those exist in the server config files. Unless you have a REALLY friendly server admin, you're not going to get access to those configuration files.
    Unfortunately, it doesn't look like you're going to be able to do too much with your hosting account. All is not lost, however. If you can find an old box to beat on you'll learn quite a bit more by installing and configuring everything yourself (I sure did!).