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

Mark Ross mark at markross.de
Sun Aug 7 12:46:55 UTC 2011


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





More information about the seaside mailing list