<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;color:#00000;'><div><br></div><div>Hi,<br></div><div><br></div><div>Here is a copy-n-paste of what Jupiter Jone's submitted in a previous thread here:<br></div><div><br></div><blockquote style="border: 1px solid rgb(204, 204, 204); padding: 7px; background-color: rgb(245, 245, 245);"><div><div><br></div><div><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></div><div><br></div><div><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> </span></span></span></span></span><br></div><div><br></div><div><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></div><div><br></div><div><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></div><div><br></div><div><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></div><div><br></div><div><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></div><div><br></div><div><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></div><div><br></div><div><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></div><div><br></div><div><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></div><div><br></div><div><br></div><div><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></div><div><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></div><div><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></div><div><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></div><div><br></div><div><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></div><div><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></div><div><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></div><div><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></div><div><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></div><div><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></div><div><br></div><div><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></div><div><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></div><div><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></div><div><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></div><div><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></div><div><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></div><div><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></div><div><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 projectname.com.au;</span></span></span></span><br></div><div><br></div><div><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></div><div><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></div><div><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></div><div><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></div><div><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></div><div><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></div><div><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></div><div><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></div><div><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></div><div><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></div><div><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></div><div><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></div><div><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></div><div><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></div><div><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></div><div><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></div><div><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></div><div><br></div><div><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></div><div><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></div><div><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></div><div><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></div><div><br></div><div><br></div></div></blockquote><div>Or...<br></div><div><br></div><div><div>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></div><div>Then put those deployed files where your Apache/Nginx/Webserver can find them.<br></div><div>Then , in your application's configuration, replace the existing Library with a custom one that returns paths/filenames to where your files are.<br></div><div><br></div></div><div><br></div><div><br></div><div class="zmail_extra"><div id="Zm-_Id_-Sgn1"><div><br></div><div>---- On Mon, 26 Nov 2018 12:13:03 -0500 <b>Bernhard Pieber <bernhard@pieber.com></b> wrote ----<br></div></div><div><br></div><blockquote style="border-left: 1px solid #cccccc; padding-left: 6px; margin:0 0 0 5px"><div><div>Hi,<br></div><div><br></div><div>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></div><div><br></div><div>Bernhard<br></div><div>_______________________________________________<br></div><div>seaside mailing list<br></div><div><a target="_blank" href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br></div><div><a target="_blank" href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br></div></div></blockquote></div><div><br></div></div><br></body></html>