[cgiapp] location of instance and application files

2005-12-18 Thread bradford
 Where's the best the place for instance and application files?

I thought, originally, that instance scripts would go in my web directory,
as in index.cgi, so it would fire automatically. But maybe, if I go with
the multi-instance scenario that Jesse just suggested, they should go in
my /cgi-bin.

And then the applications themselves would logically go in /cgi-bin as
well. So, if I have an instance script of 'users.cgi' and my applications
are My::User and ::Save I would maybe set it up like:

http://www.domain.com/cgi-bin/users.cgi
http://www.domain.com/cgi-bin/My/User.pm
http://www.domain.com/cgi-bin/My/User/Save.pm

Does this work?

What was throwing me off is the CPAN modules that are off my root directory.

Thanks,

Brad




-
Web Archive:  http://www.mail-archive.com/cgiapp@lists.erlbaum.net/
  http://marc.theaimsgroup.com/?l=cgiappr=1w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [cgiapp] location of instance and application files

2005-12-18 Thread Ron Savage
On Sun, 18 Dec 2005 18:16:20 -0500, Jeff MacDonald wrote:

Hi Jeff,

 /usr/www/www.mysite.com/www - this dir holds my cgi's my images, my
 html /usr/www/www.mysite.com/etc/ - this holds my templates, my
 modules etc.

Exactly, even though there are so many ways of doing this.

Brad,
The rules I use are:

o If the web server's config gets stuffed up, and client sees (Perl) code rather
than runs it, then they should only be allowed to see the absolute minimum.

So, a CGI script like:

#!/usr/bin/perl
use lib '/home/ron/lib';
use strict;
use warnings;
use CGI::Application::Demo;
#-
delete @ENV{'BASH_ENV', 'CDPATH', 'ENV', 'IFS', 'PATH', 'SHELL'}; # For
security.
CGI::Application::Demo - new() - run();

gives away as little as possible.

Anything the program needs to make visible to the client, eg:

-- Instance scripts
-- HTML templates
-- Images
-- Javascript
-- CSS

is in client-visible directories.

o All else is in dirs which the web server is not allowed to deliver to the
client, eg:

-- Perl modules
-- Config files

But I see Jeff puts his templates in the latter category :-). YMMV.

--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html



-
Web Archive:  http://www.mail-archive.com/cgiapp@lists.erlbaum.net/
  http://marc.theaimsgroup.com/?l=cgiappr=1w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]