[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] Re: directory structure and static pages


Mark Stosberg <suppressed> wrote:
> In article <suppressed>, David Kaufman
> wrote:
>>
>> the "externals" and "logs" subdirectories are where transient data
>> files and apache logs live, but only the directories themselves
>> exist in cvs, no files in these directories are version-controlled.
>> these directories contain just one file in cvs, a .cvsignore file,
>> containing a lone asterisk, to keep just the existence (and name) of
>> the directory in the repository, while keeping the files themselves
>> out of cvs,and local to the installation.
>
> David,
>
> How would you handle the case of uploaded images, which need to be web
> space? It strikes me that this could be handled by using the
> "cvsignore" technique above. So the files might be in:
>
> ./htdocs/images/uploads/
>
> With a .cvsignore file:
> ./htdocs/images/uploads/.cvsignore

yup, that's exactly what i do, except that i tend to put even
directories that need to be web-accessible *outside* of the physical
document root directory, and then use an Alias directive in the apache
conf (or even a symlink if necessary but --ugh, symlinks don't play nice
with cvs) to map it back *into* the webspace.  i prefer that because,
one, it makes it simple and obvious where the webserver needs write
permissions: chmod -R o+w externals while you can rest assured that
everywhere else in the hierarchy the world does *not* need write access
and should not have it, and b) it also it gives me a place to add
further
"data" directory categorizations such as:

externals/image_uploads/one_type/
externals/image_uploads/another_type/
externals/generated_reports/pdfs/
externals/generated_reports/excel/
externals/imports/
externals/exports/
externals/inbound_ftp/

and so on -- you get the idea.  not that i have that many in most
projects but i always seem to end up with at least two or three types of
files that deserve their own "externals" subdirectory.

i've often pondered splitting this into externals and externalweb
because not *all* of them need to be webserver writable.  the web app
may need only need read access to "imports" or "inbound_ftp" files, for
instance.  but for the few cases that it would never even need to move,
delete or rename such files after processing them, it's never made it
into the worth-the-effort category for me :-)

-dave


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.