[Petal] best practices question(s)

Bruno Postle bruno at mkdoc.com
Tue Jun 27 11:27:38 BST 2006


On Fri 23-Jun-2006 at 13:21 -0700, Corey wrote:
>
> Where "best" to put the pe(tal) templates -- under the
> cgi-bin or under the htdocs? i.e:
>
> * /var/www/localhost/cgi-bin/foobar/
> OR
> * /var/www/localhost/htdocs/foobar/

Neither, as there is no need for remote users to access the files 
directly.  Though I can't think of a specific security issue with 
doing this, I wouldn't describe it as good practice.

> where do you guys put your image files?

Static images need to be accessible to remote users, so these go in 
htdocs.

> As a final question - do you put your petal "view"/"controler"/"helper"
> modules ( i.e. my "FooBar.pm" ) in along with the cgi scripts
> themselves under cgi-bin, or do you put those somewhere else 
> on the system?

It depends how you intend to maintain them.  Something we try to do 
is create them as standalone perl modules and install them the same 
as any CPAN module.

-- 
Bruno


More information about the Petal mailing list