<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hiya,<div class=""><br class=""></div><div class="">Yeah Timothy is right - this is something that would be handled by the the front-end server protecting your web application.</div><div class=""><br class=""></div><div class="">In my case I have an upstream server that handles SSL/TLS and only passes legitimate urls to the configuration below.</div><div class=""><br class=""></div><div class="">You can limit what is accessible from the client with “location” directives in Nginx so for library files I think you could use something like:</div><div class=""><br class=""></div><div class="">Location ~ /files/ {}</div><div class=""><br class=""></div><div class="">The trailing slash should mean that a request for “/files” only won’t match. Would need to test that.</div><div class=""><br class=""></div><div class="">With the configuration that Timothy posted, everything is passed to seaside, so you may want to specifically disallow /files with something like:</div><div class=""><br class=""></div><div class="">Location = /files {</div><div class=""><span class="Apple-tab-span" style="white-space:pre">    </span>deny all;</div><div class="">}</div><div class=""><div><br class=""></div><div>Also, I leave the FileLibraries in the image as they are. There’s no need to change them at all. Just use FileLibrary-#deployFiles and make sure the deploy location is accessible from the front-end server at "/files" and everything should work well. In your seaside application you can use the FileLibrary to construct url’s and Nginx will server the files.</div><div><br class=""></div><div>I’m no expert either :) I find myself learning it all again each time I need to deploy a new application. It would be nice to collect all these snippets and put together some generic configurations that work “out of the box” for development and production environments. I’m happy to help with that. </div><div><br class=""></div><div>Maybe they could become part of the SeasideSt GitHub repo. I’ve copied Johan on this email - though I’m sure he’ll see it on the list :) Johan, would you mind if we add a new repo to SeasideSt - say Seaside-deployment where we could collect and contribute to various ways of putting Seaside into production?</div><div><br class=""></div><div>J</div><div><br class=""><blockquote type="cite" class=""><div class="">On 27 Nov 2018, at 10:29 am, gettimothy <<a href="mailto:gettimothy@zoho.com" class="">gettimothy@zoho.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta content="text/html;charset=UTF-8" http-equiv="Content-Type" class=""><div class=""><div style="font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;color:#00000;" class=""><div class=""><br class=""></div><div class="">Hi,<br class=""></div><div class=""><br class=""></div><div class="">Here is a copy-n-paste of what Jupiter Jone's submitted in a previous thread here:<br class=""></div><div class=""><br class=""></div><blockquote style="border: 1px solid rgb(204, 204, 204); padding: 7px; background-color: rgb(245, 245, 245);" class=""><div class=""><div class=""><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">Hi Timothy,</span></span></span></span><br class=""></div><div class=""><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">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 “/“<span class=""> </span></span></span></span></span><br class=""></div><div class=""><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">My FileLibrary deployFiles end up at the path /opt/git/projectName/www_root/files</span></span></span></span><br class=""></div><div class=""><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">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.</span></span></span></span><br class=""></div><div class=""><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">The end result is that file library resources are served from the image unless deployed, and then they are served by Nginx.</span></span></span></span><br class=""></div><div class=""><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">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.</span></span></span></span><br class=""></div><div class=""><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">Maybe there’s something here that will help.</span></span></span></span><br class=""></div><div class=""><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">Cheers,</span></span></span></span><br class=""></div><div class=""><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">J</span></span></span></span><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px"># Seaside NGINX Configuration</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">server_tokens off;</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">limit_req_zone $binary_remote_addr zone=seasideRequestLimit:10m rate=30r/m;</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">limit_conn_zone $binary_remote_addr zone=seasideConnectionLimit:10m;</span></span></span></span><br class=""></div><div class=""><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">upstream gsDevKit_seaside_fastcgi {</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">    least_conn;</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">    server localhost:13301;</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">    server localhost:13302;</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">    server localhost:13303;</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">}</span></span></span></span><br class=""></div><div class=""><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">server {</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">    listen 80;</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">    root /opt/git/projectName/www_root;</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">    client_max_body_size 10M;</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">    client_body_timeout 5s;</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">    client_header_timeout 5s;</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">    </span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">    server_name <a href="http://projectname.com.au" class="">projectname.com.au</a>;</span></span></span></span><br class=""></div><div class=""><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">    location @gsDevKit {</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">        limit_req zone=seasideRequestLimit;</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">        limit_conn seasideConnectionLimit 10;</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">        </span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">        include /usr/local/etc/nginx/fastcgi_params;</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">        fastcgi_pass gsDevKit_seaside_fastcgi;</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">    }</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">    </span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">    location /config {</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">        allow 10.0.0.1/24;</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">        allow 192.168.0.1/24;</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">        deny all;</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">    }</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">        </span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">    location / {</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">        try_files $uri $uri/ @gsDevKit;</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">    }</span></span></span></span><br class=""></div><div class=""><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">#    if ($uri = /) {</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">#        rewrite ^(.*)$ /ProjectName$1 break;</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">#    }</span></span></span></span><br class=""></div><div class=""><span class="highlight" style="background-color:rgb(39, 39, 39)"><span class="colour" style="color:rgb(68, 68, 68)"><span class="font" style="font-family:Lato"><span class="size" style="font-size:14px">}</span></span></span></span><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></div></blockquote><div class="">Or...<br class=""></div><div class=""><br class=""></div><div class=""><div class="">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.<br class=""></div><div class="">Then put those deployed files where your Apache/Nginx/Webserver can find them.<br class=""></div><div class="">Then , in your application's configuration, replace the existing Library with a custom one that returns paths/filenames to where your files are.<br class=""></div><div class=""><br class=""></div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="zmail_extra"><div id="Zm-_Id_-Sgn1" class=""><div class=""><br class=""></div><div class="">---- On Mon, 26 Nov 2018 12:13:03 -0500 <b class="">Bernhard Pieber <<a href="mailto:bernhard@pieber.com" class="">bernhard@pieber.com</a>></b> wrote ----<br class=""></div></div><div class=""><br class=""></div><blockquote style="border-left: 1px solid #cccccc; padding-left: 6px; margin:0 0 0 5px" class=""><div class=""><div class="">Hi,<br class=""></div><div class=""><br class=""></div><div class="">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.<br class=""></div><div class=""><br class=""></div><div class="">Bernhard<br class=""></div><div class="">_______________________________________________<br class=""></div><div class="">seaside mailing list<br class=""></div><div class=""><a target="_blank" href="mailto:seaside@lists.squeakfoundation.org" class="">seaside@lists.squeakfoundation.org</a><br class=""></div><div class=""><a target="_blank" href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" class="">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br class=""></div></div></blockquote></div><div class=""><br class=""></div></div><br class=""></div>_______________________________________________<br class="">seaside mailing list<br class=""><a href="mailto:seaside@lists.squeakfoundation.org" class="">seaside@lists.squeakfoundation.org</a><br class="">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside<br class=""></div></blockquote></div><br class=""></div></body></html>