[Seaside] Problem with serving static files on seaside 3.0 and lighttpd

Nick Ager nick.ager at gmail.com
Sun Aug 7 13:33:28 UTC 2011


Hi,

It's a while since I experimented with lighttpd; I believe the following
worked for me:

$HTTP["url"] !~ "^/resources/" {
#  fastcgi.debug=1
 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")
  )
 )
}

which would pass the request onto Gemstone unless the request began
with '^/resources/'
and add something similar to the below to your lighttpd configuration
server.document-root  = "/var/www/"
HTH

Nick


On 7 August 2011 13:46, Mark Ross <mark at markross.de> 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
>
> anHtmlRoot javascript url: '/resources/js/flotr.js'.
>
> 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
>
>
> Mark
>
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20110807/a4d2938a/attachment-0001.htm


More information about the seaside mailing list