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).
With this, Fyp::Main::handler will be called when you visit /test/Fyp.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>
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.
In reply to Re^2: mod_perl website structure
by remiah
in thread mod_perl website structure
by shiftee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |