On 5/21/07, eneely <[EMAIL PROTECTED]> wrote:
> The apps are all dynamic apps hitting an mssql database through
> SqlAlchemy so I can't just use plain old Apache or any other server.
I think you may have misunderstood what Cliff was suggesting. Have
Apache serve *only* the Javscript/CSS/images directly, and let Apache
forward dynamic requests to your dynamic applications. To do this,
you'd normally put the static files under a distinct directory prefix
or virtual host; e.g.:
/static : My shared static files
/pylons-app1 : A Pylons app served via ProxyPass, FastCGI, SCGI,
or your favorite handler.
/cgi-app1 : An uncoverted CGI application served via CGI or FastCGI,
possibly using ScriptAlias or RewriteRule.
The trickiest part is if you want your static files to appear at a URL
underneath your Pylons application; e.g., if your Pylons app is / and
your static files are /static. In this case you'd have to convince
Apache *not* to forward /static to the Pylons application. Whether
you can override a handler in a subdirectory depends on the handler.
For ProxyPass, put "ProxyPass /static !" before the other proxy
directives. For mod_scgi, put "<Location /static>SCGIHandler
Off</Location>".
The main downside is if you want to limit access to the static files
to logged-in users. In that case the request has to go through your
authorization routine, which is normally in your Pylons application.
> I've been down the symlink path and it just feels like a kludge to me
> to do it that way.
It makes sense in some applications but not others. I have two
applications, one for uploading/managing attachments
(images/documents), the other that only displays them. So my second
app has a symlink to the attachments directory. That way I don't have
to hardcode an absolute path in the second app's config file, which I
share between different computers.
--
Mike Orr <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---