[Catalyst] Catalyst application example

Karl.Moens at marsh.com Karl.Moens at marsh.com
Mon Dec 12 17:56:28 CET 2005


Will,

You will not find a login-page as it does not exist. The site is protected 
by the basic authentication and authorization scheme of the Apache 
web-server; i.e. all pages under "Biblio" will need authentication to be 
accessed, so it is nothing which is done in Catalyst and everything is 
configured in a standard Apache conf file:

<Location /Biblio>
        SetHandler modperl
        PerlResponseHandler CSA::Biblio
        PerlOptions +ParseHeaders
        AuthName CSA_Biblio
        AuthType Basic
        PerlAuthenHandler Apache::AuthDBI::authen
        #PerlAuthzHandler  Apache::AuthDBI::authz
        PerlSetVar Auth_DBI_data_source   dbi:mysql:biblio
        PerlSetVar Auth_DBI_username      ***
        PerlSetVar Auth_DBI_password      ***
        PerlSetVar Auth_DBI_pwd_table     users
        PerlSetVar Auth_DBI_uid_field     trigram
        PerlSetVar Auth_DBI_pwd_field     paswoord
        PerlSetVar Auth_DBI_encrypted     off
        require valid-user
</Location>

By doing this, your browser will pop-up a log-in / password dialogue box 
for the "CSA_Biblio" realm and after successful log-in you will find the 
name of the user in the environment.

If necessary you could use the more traditional .htaccess way of saving 
the passwords and user-names but as I already had a MySQL server running, 
the overhead of using it was minimal, whereas repeatedly reading and 
parsing the .htaccess file would be more "expensive" in the long run.

To point Apache to Catalyst you use the SetHandler and PerlResponseHandler 
instructions (see above), CSA::Biblio being the application module 
"CSA/Biblio.pm" which configures and initializes your site.

If you want to go straight to the Website (without passing through the 
initial welcome screen) go to: http://www.csa-biblio.be/Biblio/start


Karl


Will Smith <willbelair at yahoo.com> wrote:

Hi, i was looking around for the login page I got lost. I would like to 
see how your app running in the real world.
Another favour that I would like to ask from you is that: how to point 
apache to catalyst app. I have the same setup as yours: linux server 
running apache under mod_perl 2, MySQL 5 database. Problem is I am not 
familiar with Linux, so I get lost with path. My app is at 
home/myuseraccount/myapp , and I use the localhost to run the app. I hope 
you have some spare munites to guide me through the path setup.
thanks

Karl.Moens at marsh.com wrote:

Dear listmembers,

I finally managed to put a Catalyst-driven website on my server and open 
it out to the world.

It is a small library application allowing the members of our 
wargames-club to enter their books of military-history into a database so 
other members can look it up.

It runs on Apache2 and MySQL 4.1. The front-end server is on LINUX 
(Mandriva 10, very old Celeron 333 Mhz) serving the static content and the 
mod-perl enabled back-end server is on an old Windows 98 laptop.

The model classes use Class::DBI (and I hope to switch to DBIx::Class for 
the next version). The View classes use Template::Toolkit.

You can have a look at it here: http://www.csa-biblio.be (with frames) or http://csa-in-exile.be (without frames). Just click the large "CSA" logo to continue.

A guest log-in is available: ID is "gst" and password is "guest".

Please note that the PDF-output of the catalogue doesn't work (yet). 
Splitting the static and dynamic content over two servers broke it. I will 
repair it as soon as I have an hour to spare :-)

Comments, suggestions, ... are of course always welcome.

Karl


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This message and any attachments are confidential. If you have received 
this message in error please delete it from your system. If you require 
any assistance please notify the sender. Thank You.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20051212/56fdda21/attachment-0001.htm


More information about the Catalyst mailing list