P Kishor wrote:
On 1/25/09, Matthew Whipple <[email protected]> wrote:
P Kishor wrote:
Very well put. So, how do I make the webserver (in my case, Apache
without mod_perl, for now) serve directly anything under /img (or any
other specified folder) without invoking C::A::Dispatch?
Many thanks in advance.
Puneet.
Try moving the img directory out of the directory handled by dispatching
and then accessing it through an Apache alias.
hmmm... I was hoping for a different solution. While the above is
doable, it messes up my mellow. My directory structure is thusly
<site folder>/
- index.cgi
- _perl/.. various Perl modules for this site
- _tmpl/.. html templates
- _logs/.. my own logs
- css/.. stylesheets
- js/.. javascripts
- img/.. images and other media
All folders prefixed with '_' are *not* accessible directly via the
web, while the other folders, css, js and img contain stuff that can
be accessed through a URL. That way I can give some a direct URL to an
image in the img directory, for instance. This also allows me to keep
everything specific to a web application within its own folder. If I
move the img directory outside the <site folder>, I no longer have a
single folder for a single application.
The issue is that (seemingly) you've assigned a default handler for the
entire directory, overriding the web server normal functionality. This
could potentially be reversed by Perl but that is a convoluted
solution. You could restructure your directories so that all of the
scripts (or those handled as such) are separated within the project
parent directory (more of a traditional cgi-bin setup while still
keeping projects grouped together), or implement more selective handler
assignment.
A related question -- am I attempting something that is unusual? I
thought I was doing something very logical and reasonable, but then,
we always tend to think highly of our own strategies until we are
shown better ways.
Many thanks,
Puneet.
##### CGI::Application community mailing list ################
## ##
## To unsubscribe, or change your message delivery options, ##
## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp ##
## ##
## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ##
## Wiki: http://cgiapp.erlbaum.net/ ##
## ##
################################################################
##### CGI::Application community mailing list ################
## ##
## To unsubscribe, or change your message delivery options, ##
## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp ##
## ##
## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ##
## Wiki: http://cgiapp.erlbaum.net/ ##
## ##
################################################################