[Seaside] /files application

gettimothy gettimothy at zoho.com
Mon Nov 26 23:29:56 UTC 2018

Hi, Here is a copy-n-paste of what Jupiter Jone's submitted in a previous thread here: 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;         allow;         deny all;     }              location / {         try_files $uri $uri/ @gsDevKit;     } #    if ($uri = /) { #        rewrite ^(.*)$ /ProjectName$1 break; #    } } Or... I am not an expert, but on the FileLibrary, run "deployFiles" command and this will output the stuff contained within the FileLibrary to the file system wherever your Squeak is running. Then put those deployed files where your Apache/Nginx/Webserver can find them. Then , in your application's configuration, replace the existing Library with a custom one that returns paths/filenames to where your files are. ---- On Mon, 26 Nov 2018 12:13:03 -0500 Bernhard Pieber <bernhard at pieber.com> wrote ---- Hi, I am using a file library (JQDeploymentLibrary) in a deployed image. If I enter /files I get a listing of all flle libraries under the heading of "Index of /files". I would like to remove that functionality in the deployed application. It seems I cannot just remove the /files application itself because if I do JQuery stops working. I'd appreciate any tips on how to solve that. Bernhard _______________________________________________ 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/20181126/82ff570f/attachment.html>

More information about the seaside mailing list