[Seaside] Problem with serving static files on seaside 3.0 and
lighttpd
Mark Ross
mark at markross.de
Sun Aug 7 13:46:59 UTC 2011
Hi Nick,
THANK you very much, as I mentioned the solution was simple -but I didn´t find it.
I added the line as you described, and my installation is working, as wanted.
I am very happy!
Best regards
Mark
Am 07.08.2011 um 15:33 schrieb Nick Ager:
> 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
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
More information about the seaside
mailing list