Keeping track of scripts and where their files are expected to be is proving painful. Installation and update is proving painful.
Make a standard. It really doesn't matter much what it is, but just having a standard you follow will make your maintenence much simpler.
Here is what I do. You don't have to do this, but I like and it seems to work well :
This way Apache (in a straight cgi app) only needs to know about the 'cgi', 'html', and 'images' dir. It won't try to serve files out of 'lib', 'conf', or 'tmp'. This system also translates to __insert_favorite_versioning_system_here__ very well. You can set the 'images' folder for binary processing and ignore the 'tmp' dir./www /project_name /html /cgi /lib /conf /images /tmp #if needed
If you don't standardize you layout, it's quite easy to make a simple mistake that exposes your 'lib' or 'conf' files. You'll get into the habit of not including these directories in your httpd.conf and all you really need to when progamming is use lib '../lib/';
Then make a simple script to create your standard layout. You can even include some starter scripts with some standard modules like Template Toolkit or CGI::Application, ...
In reply to Re: cgi apps, is it bad juju to pile program and conf file, template, etc under one directory in cgi-bin?
by grep
in thread cgi apps, is it bad juju to pile program and conf file, template, etc under one directory in cgi-bin?
by leocharre
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |