[Seaside] WAFileLibrary deployFiles then what?

gettimothy gettimothy at zoho.com
Sat Nov 24 18:27:24 UTC 2018


Nice!

Thank you. I will add this to SeasideDoc as a HOWTO and when I get time I will study this.

I am a nginx  neophyte and much of that config is new to me, yet I see so e really cool stuff already!

Thx again


---- On Sat, 24 Nov 2018 05:56:24 -0500 jupiter.jones at mail.com wrote ----


Hi Timothy,

Maybe I’m late to the party here, but this is how I deal with it. The following is a dedicated seaside application server so the location is simply “/“

My FileLibrary deployFiles end up at the path /opt/git/projectName/www_root/files

I also added the the limits which seem to help keep things working when I get a heap of requests trying to break things or test for php things.

The end result is that file library resources are served from the image unless deployed, and then they are served by Nginx.

The key is the try_files directive that looks for files in the file system and if that fails passes it to the backend. Seems to work well.

Maybe there’s something here that will help.

Cheers,

J


# Seaside NGINX Configuration
server_tokens off;
limit_req_zone $binary_remote_addr zone=seasideRequestLimit:10m rate=30r/m;
limit_conn_zone $binary_remote_addr zone=seasideConnectionLimit:10m;

upstream gsDevKit_seaside_fastcgi {
    least_conn;
    server localhost:13301;
    server localhost:13302;
    server localhost:13303;
}

server {
    listen 80;
    root /opt/git/projectName/www_root;
    client_max_body_size 10M;
    client_body_timeout 5s;
    client_header_timeout 5s;
    
    server_name projectname.com.au;

    location @gsDevKit {
        limit_req zone=seasideRequestLimit;
        limit_conn seasideConnectionLimit 10;
        
        include /usr/local/etc/nginx/fastcgi_params;
        fastcgi_pass gsDevKit_seaside_fastcgi;
    }
    
    location /config {
        allow 10.0.0.1/24;
        allow 192.168.0.1/24;
        deny all;
    }
        
    location / {
        try_files $uri $uri/ @gsDevKit;
    }

#    if ($uri = /) {
#        rewrite ^(.*)$ /ProjectName$1 break;
#    }
}




_______________________________________________
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/20181124/76966533/attachment.html>


More information about the seaside mailing list