<!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> Hi Joachim,<br></div><div><br></div><div>I understand now....<br></div><div><br></div><div>Yes, I do have NGinx listening on port 80  with reverse proxy to Squeak for specific applications...zurb, SeasideDoc, dotiXt....<br></div><div><br></div><div class="zmail_extra"><div id="Zm-_Id_-Sgn1"><div>resources, such as images, css and javascript are "routed" via various location blocks...<blockquote style="border: 1px solid rgb(204, 204, 204); padding: 7px; background-color: rgb(245, 245, 245);"><div>       location ~* .(js)$ {<br></div><div><br></div><div>          try_files /zurb/$uri  /jquery-ui/$uri /jquery-ui/external/jquery/$uri =400;<br></div><div>          expires 1y;<br></div><div>          sendfile   on;<br></div><div>          tcp_nopush on;<br></div><div>          default_type application/javascript;<br></div><div>          add_header Content-Type: application/javascript;<br></div><div>          add_header Access-Control-Allow-Origin *;<br></div><div>        }<br></div></blockquote><br></div><div>then, for specific applications, a proxy_pass is issued...<br></div><div><br></div></div></div><blockquote style="border: 1px solid rgb(204, 204, 204); padding: 7px; background-color: rgb(245, 245, 245);"><div><div class="zmail_extra"><div id="Zm-_Id_-Sgn1"><div>        location ~* ^/SeasideDoc {<br></div></div></div><div>            proxy_pass <a href="http://127.0.0.1:8080" target="_blank">http://127.0.0.1:8080</a>;<br></div><div>            include       mime.types;<br></div><div>        }<br></div><div>        location ~* ^/zurb {<br></div><div>            proxy_pass <a href="http://127.0.0.1:8080" target="_blank">http://127.0.0.1:8080</a>;<br></div><div>        }<br></div></div></blockquote><div class="zmail_extra"><div id="Zm-_Id_-Sgn1"><div>Both those applications, within Squeak have their FileLibrary accessors mapped to use the file system via the nginx rules.<br></div><div>It works great.<br></div><div><br></div><div>The problem was that JQuery, bootstrap, etc examples have their javascript, css and images stored within their FileLibrary classes and the nginx rules reject the requests.<br></div><div><br></div><div>From within SeasideDoc (accessed via Nginx) I link to the JQuery,Bootstrap, etc apps using the 8080 port</div><div><br></div><div>So, yes, if I get pounded via port 8080, I am in trouble. Fortunately, the bots are only attacking port 80 as far as I can tell.<br></div><div><br></div><div>thanks for the heads up.<br></div><div><br></div><div>t</div><div><br></div><div>---- On Thu, 22 Nov 2018 02:46:02 -0500 <b><jtuchel@objektfabrik.de></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 class="x_-217247475moz-cite-prefix">Timothy,<br></div><div class="x_-217247475moz-cite-prefix"><br></div><div class="x_-217247475moz-cite-prefix">please keep in mind that from time to       time* someone out there will flood your server with requests for       .php files and other assets that are known to present security       holes. Your Smalltalk image will surely break down when somebody       asks for those files a couple of hundred times a second. I'd       rather have nginx or Apache handle the 404 stuff for these       situations...<br></div><div class="x_-217247475moz-cite-prefix"><br></div><div class="x_-217247475moz-cite-prefix">So if you plan to deploy on a publicly       reachable machine, I strongly recommend to overthink your       approach.<br></div><div class="x_-217247475moz-cite-prefix"><br></div><div class="x_-217247475moz-cite-prefix"><br></div><div class="x_-217247475moz-cite-prefix">Joachim<br></div><div class="x_-217247475moz-cite-prefix"><br></div><div class="x_-217247475moz-cite-prefix">* form time to time in this context can       vary between every few days to several times a day<br></div><div class="x_-217247475moz-cite-prefix"><br></div><div class="x_-217247475moz-cite-prefix">Am 22.11.18 um 08:41 schrieb <a class="x_-217247475moz-txt-link-abbreviated" href="mailto:jtuchel@objektfabrik.de" target="_blank">jtuchel@objektfabrik.de</a>:<br></div><div><br></div><p><br></p><div>_______________________________________________<br></div><div>seaside mailing list<br></div><div><a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br></div><div><a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br></div></div><blockquote><div class="x_-217247475moz-cite-prefix">Hi Timothy, <br></div><div class="x_-217247475moz-cite-prefix"><br></div><div class="x_-217247475moz-cite-prefix">still not sure I understand. You want         to deploy files but serve them from the image?<br></div><div class="x_-217247475moz-cite-prefix">Isn't the whole idea of #deployFiles         not to serve them from the image and use those CPU-Cycles in the         Smalltalk image for something with more value...?<br></div><div class="x_-217247475moz-cite-prefix"><br></div><div class="x_-217247475moz-cite-prefix">Joachim<br></div><div class="x_-217247475moz-cite-prefix"><br></div><div class="x_-217247475moz-cite-prefix"><br></div><div class="x_-217247475moz-cite-prefix">Am 21.11.18 um 15:50 schrieb         gettimothy:<br></div><blockquote><div style="font-size: 10pt; font-family: Verdana, Arial, Helvetica, sans-serif"><div>Hi Joachim<br></div><div><br></div><div>Thanks for the response. That what I was doing , but its             a big job as I will be loading JQuery-ui, JQuery, Bootstrap,             MaterialDesign, Seaside.... from the apps menu in             SeasideDoc.<br></div><div><br></div><div>However!!!! I found an acceptable work-around that             bypasses NGINX completely.<br></div><div><br></div><div>The base SeasideDoc files are referenced like: <br></div><blockquote style="border: 1px solid rgb(204, 204, 204); padding: 7px; background-color: rgb(245, 245, 245)"><div>SeasideDocLibrary baseUrl,'jquery-ui.js' ->'<a href="http://192.168.1.102/jquery-ui.js" target="_blank">http://192.168.1.102/jquery-ui.js</a>'<br></div></blockquote><div>and are  handled via Nginx.<br></div><div><br></div><div><br></div><div>I figured out I could bypass NGINX completely by tacking             on an :8080 to the url...<br></div><div><br></div><div><blockquote style="border: 1px solid rgb(204, 204, 204); padding: 7px; background-color: rgb(245, 245, 245)"><div>(SeasideDocLibrary alternatePort: (SeasideDocLibrary                 baseUrl)) ,'bootstrap' --> '<a target="_blank" href="http://192.168.1.102:8080/bootstrap">http://192.168.1.102:8080/bootstrap</a>'<br></div></blockquote><div>This means the Show/Call stuff for apps will not be in the             cards for the apps, but I think this is an acceptable             tradeoff.<br></div><div><br></div><div>cheers,<br></div><div>t<br></div></div><div class="x_-217247475zmail_extra"><div><div><br></div><div>---- On Wed, 21 Nov 2018 02:41:07 -0500 <b><a class="x_-217247475moz-txt-link-rfc2396E" href="mailto:jtuchel@objektfabrik.de" target="_blank"><jtuchel@objektfabrik.de></a></b> wrote ----<br></div></div><div><br></div><blockquote style="border-left: 1px solid rgb(204, 204, 204); padding-left: 6px; margin: 0 0 0 5px"><div><div>Timothy,<br></div><div><br></div><div>not sure I am answering the right question here,                   but the idea of deploying files to the file system in                   a production system is that requests coming in for                   files never reach your smalltalk image, thus keeping                   load off your image.<br></div><div><br></div><div>So what is needed is a definition for nginx that                   "catches" requests to /files/ and redirect them to                   files onyour filesystem, namely the path you deployed                   your files to.<br></div><div><br></div><div>I am using Apache, so I cannot say what exactly                   needs to be done in nginx, <br></div><div><br></div><div>Here's what's in my apache conf for this purpose:<br></div><div><br></div><div> <span>       Alias /files /var/www/app.kontolino<br>         ProxyPass /files !<br> <br>         Alias /favicon.ico                     /var/www/app.kontolino/OfBuchhaltungFileLibrary/favicon.ico<br>         ProxyPass /favicon.ico !<br> <br>         Alias /robots.txt                     /var/www/app.kontolino/OfBuchhaltungFileLibrary/robots.txt<br>         ProxyPass /robots.txt !</span></div><div><br></div><div>So all you need to do is to transpile this for                   nginx ;-)<br></div><div><br></div><div>HTH<br></div><div><br></div><div>Joachim<br></div><div><br></div><div><br></div><div>Am 21.11.18 um 08:32 schrieb gettimothy:<br></div><div><br></div><p><br></p><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 style="font-size: 10pt; font-family: Verdana, Arial, Helvetica, sans-serif"><div>After you deploy the files, does Seaside have a                     "pass thru" to access those files automatically? or                     do I have to build one by hand?<br></div><div><br></div><div>Here is the background/motivation.<br></div><div><br></div><div>At <a href="http://menmachinesmaterials.com/SeasideDoc" target="_blank">http://menmachinesmaterials.com/SeasideDoc</a>                      on left menu, under "apps" you will see that the                     css/javascript access for 'Zurb Foundation' works                     and neither work for the Twitter Bootstrap or Jquery                     apps.<br></div><div><br></div><div>The reason is that I use NGinx locations to tell                     where to look for resources.<br></div><div><br></div><div>My SeasideDoc and Zurb File ibraries all access                     their files relative to the nginx defintions.  So,                     'ZurbExamplesLibrary foundation.css' will resolve to                     the correct path for Nginx to handle.<br></div><div><br></div><div>The TBS and JQuery FileLibraries are 'self                     contained' and the css and js is not delivered via                     Nginx.<br></div><div><br></div><div>I am in the process of creating an additional                     library for TBS that uses my convention...but...<br></div><div><br></div><div>I just discovered the "deployFiles' method and it                     does do a nice dump of the files I need...but then                     what?<br></div><div><br></div><div>Does Seaside standard dev practice include                     "switching to another library" that automatically                     routes to those urls that I am missing? <br></div><div><br></div><div>thx in advance.<br></div><div><br></div><div>t<br></div><div><br></div><div><br></div><div><br></div></div><div><br></div><div><br></div><pre>_______________________________________________
seaside mailing list
<a target="_blank" href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a>
<a target="_blank" href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a>

<br></pre></blockquote></blockquote></div><div><br></div></div><div><br></div><div><br></div><pre class="x_-217247475moz-quote-pre">_______________________________________________
seaside mailing list
<a class="x_-217247475moz-txt-link-abbreviated" href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a>
<a class="x_-217247475moz-txt-link-freetext" href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a>
<br></pre></blockquote><p><br></p><div><br></div><pre class="x_-217247475moz-quote-pre">_______________________________________________
seaside mailing list
<a class="x_-217247475moz-txt-link-abbreviated" href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a>
<a class="x_-217247475moz-txt-link-freetext" href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a>
<br></pre></blockquote></blockquote></div><div><br></div></div><br></body></html>