Thanks a lot Michael. 

Everything works fine now.

I won't use any templating system and write plain cgi perl code. Templating systems 
(Mason, EmbPerl, Asp, Template toolkit, etc) are too much pain to compile on Aix 5.1 
running Apache2/mod_perl2. I wasted way TOO MUCH time trying to make Mason work on 
Aix. Gotta like print statements!

Thanks,

Steve Hemond
Programmeur Analyste / Analyst Programmer
Smurfit-Stone, Ressources Forestières
La Tuque, P.Q.
Tel.: (819) 676-8100 X2833
[EMAIL PROTECTED] 



 > -----Original Message-----
 > From: Michael C. Davis [mailto:[EMAIL PROTECTED] 
 > Sent: Wednesday, February 04, 2004 10:15 AM
 > To: [EMAIL PROTECTED]
 > Subject: Re: Handlers/locations
 > 
 > 
 > I had the same issue when I installd modperl.
 > 
 > My solution was to put everything Perlish in the "root", 
 > with plain HTML stylesheets and images under it.  So it 
 > looked like this:
 > 
 > /htdocs/myapp   <-- executable Perl
 > /htdocs/myapp/img  <-- not executable
 > /htdocs/myapp/css <-- not executable
 > htdocs/myapp/html  <-- not executable
 > 
 > Then I used directory to tell Apache that the myapp was 
 > executable for perl but everything below it was not, like this:
 > 
 > # Serves d:\htdocs\smurfbuster\index.html as 
 > http://localhost/smurfbuster/index.html
 > Alias /myapp/ "d:/htdocs/myapp/"
 > <Directory d:/htdocs/myapp>
 >     Order allow,deny
 >     Allow from all
 >     SetHandler perl-script
 >     PerlResponseHandler ModPerl::Registry
 >     PerlOptions +ParseHeaders
 >     Options +ExecCGI
 > </Directory>
 > 
 > # keep from trying to interpret as Perl for everything under 
 > myapp # note the /* on end of specified directory ... it's 
 > everything in directories BELOW myapp <Directory 
 > "d:/htdocs/myapp/*"> SetHandler default-handler </Directory>
 > 
 > THe above code is not necessarily complete; it's copied and 
 > pasted from different part of my httpd.conf because I now 
 > use HTML::Mason and my setup has changed, but it 
 > demonstrates the basic idea.
 > 
 > When I was new to Apache and mod_perl, the Apache doc page 
 > that described how to combined multiple directives really 
 > turned the lightbulb on, and it's probably worth reviewing:
 > 
 > http://httpd.apache.org/docs-2.0/sections.html#mergin
 > 
 > And I highly recommend HTML::Mason if you are going to write 
 > more than just a few web pages.
 > 
 > http://www/masonhq.com
 > 
 > 
 > At 09:05 AM 2/4/04 -0500, Hemond, Steve wrote:
 > >Hi ppl,
 > >
 > >I have setup Apache2/mod_perl and started writing perl scripts to 
 > >generate html code.
 > >
 > >I have a /wood/ directory with two subdirs : /perl/ and /images/
 > >
 > >Actually I have setup httpd.conf this way :
 > >
 > ><Directory /prog/www/wood/perl>
 > >    SetHandler perl-script
 > >    PerlResponseHandler ModPerl::Registry
 > >    PerlOptions +ParseHeaders
 > >    Options +ExecCGI
 > ></Directory>
 > >
 > >In my perl file I have this line :
 > ><link type="text/css" rel="stylesheet" href="../menu.css"></link>
 > >
 > >And this line:
 > ><img src="../images/banner.jpg"></img>
 > >
 > >The problem is it don't go at the right place to find my image and 
 > >stylesheet. [Tue Feb 03 15:08:58 2004] [error] 51806: 
 > >ModPerl::Registry: /prog/www/wood/perl/menu.css not found 
 > or unable to 
 > >stat [Tue Feb 03 15:08:58 2004] [error] 41882: ModPerl::Registry: 
 > >/prog/www/wood/perl/images not found or unable to stat
 > >
 > >If I put the perl files in the root directory (/wood/) and 
 > setup httpd 
 > >conf this way : <Directory /prog/www/wood/>
 > >    SetHandler perl-script
 > >    PerlResponseHandler ModPerl::Registry
 > >    PerlOptions +ParseHeaders
 > >    Options +ExecCGI
 > ></Directory>
 > >
 > >I make it look under /images/ but it tries to read the .jpg 
 > byte per 
 > >byte like if it would be a perl file!
 > >
 > >The best solution for me is to have all perl and html files 
 > in the root 
 > >directory, and have the images under the /images/ subdirectory, and 
 > >maybe the stylesheets in the /style/ subdirectory.
 > >
 > >What would be the best httpd.conf configuration to do that?
 > >
 > >Thanks a lot for your help
 > >
 > >Best regards,
 > >
 > >Steve Hemond
 > >Programmeur Analyste / Analyst Programmer
 > >Smurfit-Stone, Ressources Forestieres
 > >La Tuque, P.Q.
 > >Tel.: (819) 676-8100 X2833
 > >[EMAIL PROTECTED]
 > >
 > >
 > >--
 > >Reporting bugs: http://perl.apache.org/bugs/
 > >Mail list info: http://perl.apache.org/maillist/modperl.html
 > >List etiquette: http://perl.apache.org/maillist/email-etiquette.html
 > >
 > >
 > >
 > 
 > -- 
 > Reporting bugs: http://perl.apache.org/bugs/
 > Mail list info: http://perl.apache.org/maillist/modperl.html
 > List etiquette: http://perl.apache.org/maillist/email-etiquette.html
 > 
 > 

--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to