Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: mod_perl website structure

by shiftee (Initiate)
on Oct 14, 2011 at 17:15 UTC ( [id://931561]=note: print w/replies, xml ) Need Help??


in reply to mod_perl website structure

Thanks guys!!

Replies are listed 'Best First'.
Re^2: mod_perl website structure
by remiah (Hermit) on Oct 16, 2011 at 01:32 UTC
    I am reading Practical Mod Perl.

    I want to use perl to generate the pages, do I need to tell httpd.conf to serve e.g. index.pl automatically instead of index.html OR should I set a handler for the location DocRoot?? (if i want to put dynamic content on the first page)

    DirectoryIndex directive in httpd.conf will look up index.pl, index.html, or somthing you like. Your Fyp::Main have handler() function, so, you have to tell apache that when the http request come, apache should kick Fyp::Main::handler. httpd.conf for Fyp::Main will looks like this( from Practical Mod Perl p.254).

    PerlModule Fyp::Main #load your module <Location /test/Fyp> SetHandler perl-script #invoke mod_perl to run the script PerlHandler Apache::Registry #not Apache::PerlRun,but with Apache::R +egistry PerlHandler Fyp::Main #call hander() in Fyp:Main </Location>
    With this, Fyp::Main::handler will be called when you visit /test/Fyp.

    For authentication I want to check the credentials against a database, do the Apache authentication modules have anything to do with this??

    I noticed that this was my very concern when I began to read Practical Mod Perl. There seems a lot of things for mod_perl and now I am in Chapter 17 of this book, it began to talk about database at last. Appendix of this book seems to have authentication staff. And there seems to be a module like mod_auth_mysql and somthing.

    I mean ... I'm in the way. As Anonymous Monk says, to understand web application frameworks, like Catalyst, Mojolicious , or O/R mapper like DBI::classX seems to have great importance nowadays. But anyway, Practical Mod Perl is very very interesting.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://931561]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-23 15:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found