[Seaside] Problem with serving static files on seaside 3.0 and
johan at inceptive.be
Sun Aug 7 13:27:50 UTC 2011
Did you use the same lighttpd configuration in seaside2.8 ?
It seems to me that the fastcgi entry is always consuming all requests, hence your static file serving works only when you turn the fastcgi entry off.
Try only redirecting to the
fastcgi.server = ( "/myapp" => (
Maybe there are ways to define a different selection order for requests that match multiple url match blocks, but I have only limited experience using lighttpd.
A solution can be to set the fastcgi match block last?
On 07 Aug 2011, at 14:46, Mark Ross wrote:
> Hi all!
> I tried hard in the last days to serve static files for my seaside application, but had no success.
> I want to leave static files on the server (/var/www/resources/css/*; js/*; images/*) and access them from within my seaside application e.g. by
That looks correct.
Just a small remark is that you might want consider using #resourceUrl:
See more about that here: http://book.seaside.st/book/in-action/serving-files/images
> This works for me, until upgrading to Seaside 3.
> My configuration:
> GemStone/S 64 3.0.0, fastCGI, lighttpd, Debian stable 64 bit.
> GemStone/S, Seaside, fastCGI and lighttpd are running perfect, but I can´t access static files (/var/www/resources) from within Seaside (e.g.: /resources/css/screen.css not found ).
> I have to configure seaside to handle the resources directory to access the static files - but I have no idea how.
> FastCGI is handling all the requests up from '/'
> My lightttpd config(part for fastcgi) - Thanks to Miguel Cobá (http://miguel.leugim.com.mx/index.php/2008/09/27/gemstones-and-fastcgi-with-lighttpd/):
> # forward the request to the fastcgi hosts
> fastcgi.server = ( "/" => (
> ( "host" => "127.0.0.1", "port" => 9001, "check-local" => "disable"),
> ( "host" => "127.0.0.1", "port" => 9002, "check-local" => "disable"),
> ( "host" => "127.0.0.1", "port" => 9003, "check-local" => "disable")
> # enabling server dir listing to prove if lighttpd is serving the files - ok
> server.dir-listing = "enable"
> -> When I switch off fastcgi server I can lighttpd is serving the files.
> I tried to add:
> * a new Seaside Dispatcher: 'resources' with server path '/var/www/resources'
> * configuration in lighttpd:
> alias.url += ( "/resources/" => "/var/www/resources" )
> * url.rewrite-once = (
> "^(/resources.*)$" => "$1",
> "^(/.*)$" => "/$1"
> * I read the seaside docs, the web and book.seaside.st (which covers static file serving, but with apache)
> I think it is no difficult setting.
> Anybody out to help?
> Best regards
> seaside mailing list
> seaside at lists.squeakfoundation.org
More information about the seaside