<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=""><br class=""><div class="">In our development setup, we use Zinc’s ZnZincStaticServerAdaptor to serve the external js, css, … files directly from the image. </div><div class="">From what I understand, this is maybe what you are looking for?</div><div class=""><br class=""></div><div class="">I believe all info you need is in the Pharo books that explain Zinc. I don’t have any reusable code to share directly as our dev setup is specific.</div><div class=""><br class=""></div><div class=""><div>There used to be a WAExternalFileLibrary for Seaside 3.0 that allowed to serve the files residing externally to the image but it’s use case is now covered by Zinc.</div><div><br class=""></div><div>Johan</div><div><br class=""><blockquote type="cite" class=""><div class="">On 23 Nov 2018, at 02:57, 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=""> Hi Joachim,<br class=""></div><div class=""><br class=""></div><div class="">I understand now....<br class=""></div><div class=""><br class=""></div><div class="">Yes, I do have NGinx listening on port 80  with reverse proxy to Squeak for specific applications...zurb, SeasideDoc, dotiXt....<br class=""></div><div class=""><br class=""></div><div class="zmail_extra"><div id="Zm-_Id_-Sgn1" class=""><div class="">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);" class=""><div class="">       location ~* .(js)$ {<br class=""></div><div class=""><br class=""></div><div class="">          try_files /zurb/$uri  /jquery-ui/$uri /jquery-ui/external/jquery/$uri =400;<br class=""></div><div class="">          expires 1y;<br class=""></div><div class="">          sendfile   on;<br class=""></div><div class="">          tcp_nopush on;<br class=""></div><div class="">          default_type application/javascript;<br class=""></div><div class="">          add_header Content-Type: application/javascript;<br class=""></div><div class="">          add_header Access-Control-Allow-Origin *;<br class=""></div><div class="">        }<br class=""></div></blockquote><br class=""></div><div class="">then, for specific applications, a proxy_pass is issued...<br class=""></div><div class=""><br class=""></div></div></div><blockquote style="border: 1px solid rgb(204, 204, 204); padding: 7px; background-color: rgb(245, 245, 245);" class=""><div class=""><div class="zmail_extra"><div id="Zm-_Id_-Sgn1" class=""><div class="">        location ~* ^/SeasideDoc {<br class=""></div></div></div><div class="">            proxy_pass <a href="http://127.0.0.1:8080/" target="_blank" class="">http://127.0.0.1:8080</a>;<br class=""></div><div class="">            include       mime.types;<br class=""></div><div class="">        }<br class=""></div><div class="">        location ~* ^/zurb {<br class=""></div><div class="">            proxy_pass <a href="http://127.0.0.1:8080/" target="_blank" class="">http://127.0.0.1:8080</a>;<br class=""></div><div class="">        }<br class=""></div></div></blockquote><div class="zmail_extra"><div id="Zm-_Id_-Sgn1" class=""><div class="">Both those applications, within Squeak have their FileLibrary accessors mapped to use the file system via the nginx rules.<br class=""></div><div class="">It works great.<br class=""></div><div class=""><br class=""></div><div class="">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 class=""></div><div class=""><br class=""></div><div class="">From within SeasideDoc (accessed via Nginx) I link to the JQuery,Bootstrap, etc apps using the 8080 port</div><div class=""><br class=""></div><div class="">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 class=""></div><div class=""><br class=""></div><div class="">thanks for the heads up.<br class=""></div><div class=""><br class=""></div><div class="">t</div><div class=""><br class=""></div><div class="">---- On Thu, 22 Nov 2018 02:46:02 -0500 <b class=""><<a href="mailto:jtuchel@objektfabrik.de" class="">jtuchel@objektfabrik.de</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="x_-217247475moz-cite-prefix">Timothy,<br class=""></div><div class="x_-217247475moz-cite-prefix"><br class=""></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 class=""></div><div class="x_-217247475moz-cite-prefix"><br class=""></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 class=""></div><div class="x_-217247475moz-cite-prefix"><br class=""></div><div class="x_-217247475moz-cite-prefix"><br class=""></div><div class="x_-217247475moz-cite-prefix">Joachim<br class=""></div><div class="x_-217247475moz-cite-prefix"><br class=""></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 class=""></div><div class="x_-217247475moz-cite-prefix"><br class=""></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 class=""></div><div class=""><br class=""></div><p class=""><br class=""></p><div class="">_______________________________________________<br class=""></div><div class="">seaside mailing list<br class=""></div><div class=""><a href="mailto:seaside@lists.squeakfoundation.org" target="_blank" class="">seaside@lists.squeakfoundation.org</a><br class=""></div><div class=""><a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank" class="">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br class=""></div></div><blockquote class=""><div class="x_-217247475moz-cite-prefix">Hi Timothy, <br class=""></div><div class="x_-217247475moz-cite-prefix"><br class=""></div><div class="x_-217247475moz-cite-prefix">still not sure I understand. You want         to deploy files but serve them from the image?<br class=""></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 class=""></div><div class="x_-217247475moz-cite-prefix"><br class=""></div><div class="x_-217247475moz-cite-prefix">Joachim<br class=""></div><div class="x_-217247475moz-cite-prefix"><br class=""></div><div class="x_-217247475moz-cite-prefix"><br class=""></div><div class="x_-217247475moz-cite-prefix">Am 21.11.18 um 15:50 schrieb         gettimothy:<br class=""></div><blockquote class=""><div style="font-size: 10pt; font-family: Verdana, Arial, Helvetica, sans-serif" class=""><div class="">Hi Joachim<br class=""></div><div class=""><br class=""></div><div class="">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 class=""></div><div class=""><br class=""></div><div class="">However!!!! I found an acceptable work-around that             bypasses NGINX completely.<br class=""></div><div class=""><br class=""></div><div class="">The base SeasideDoc files are referenced like: <br class=""></div><blockquote style="border: 1px solid rgb(204, 204, 204); padding: 7px; background-color: rgb(245, 245, 245)" class=""><div class="">SeasideDocLibrary baseUrl,'jquery-ui.js' ->'<a href="http://192.168.1.102/jquery-ui.js" target="_blank" class="">http://192.168.1.102/jquery-ui.js</a>'<br class=""></div></blockquote><div class="">and are  handled via Nginx.<br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">I figured out I could bypass NGINX completely by tacking             on an :8080 to the url...<br class=""></div><div class=""><br class=""></div><div class=""><blockquote style="border: 1px solid rgb(204, 204, 204); padding: 7px; background-color: rgb(245, 245, 245)" class=""><div class="">(SeasideDocLibrary alternatePort: (SeasideDocLibrary                 baseUrl)) ,'bootstrap' --> '<a target="_blank" href="http://192.168.1.102:8080/bootstrap" class="">http://192.168.1.102:8080/bootstrap</a>'<br class=""></div></blockquote><div class="">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 class=""></div><div class=""><br class=""></div><div class="">cheers,<br class=""></div><div class="">t<br class=""></div></div><div class="x_-217247475zmail_extra"><div class=""><div class=""><br class=""></div><div class="">---- On Wed, 21 Nov 2018 02:41:07 -0500 <b class=""><a class="x_-217247475moz-txt-link-rfc2396E" href="mailto:jtuchel@objektfabrik.de" target="_blank"><jtuchel@objektfabrik.de></a></b> wrote ----<br class=""></div></div><div class=""><br class=""></div><blockquote style="border-left: 1px solid rgb(204, 204, 204); padding-left: 6px; margin: 0 0 0 5px" class=""><div class=""><div class="">Timothy,<br class=""></div><div class=""><br class=""></div><div class="">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 class=""></div><div class=""><br class=""></div><div class="">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 class=""></div><div class=""><br class=""></div><div class="">I am using Apache, so I cannot say what exactly                   needs to be done in nginx, <br class=""></div><div class=""><br class=""></div><div class="">Here's what's in my apache conf for this purpose:<br class=""></div><div class=""><br class=""></div><div class=""> <span class="">       Alias /files /var/www/app.kontolino<br class="">         ProxyPass /files !<br class=""> <br class="">         Alias /favicon.ico                     /var/www/app.kontolino/OfBuchhaltungFileLibrary/favicon.ico<br class="">         ProxyPass /favicon.ico !<br class=""> <br class="">         Alias /robots.txt                     /var/www/app.kontolino/OfBuchhaltungFileLibrary/robots.txt<br class="">         ProxyPass /robots.txt !</span></div><div class=""><br class=""></div><div class="">So all you need to do is to transpile this for                   nginx ;-)<br class=""></div><div class=""><br class=""></div><div class="">HTH<br class=""></div><div class=""><br class=""></div><div class="">Joachim<br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Am 21.11.18 um 08:32 schrieb gettimothy:<br class=""></div><div class=""><br class=""></div><p class=""><br class=""></p><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 class=""><div style="font-size: 10pt; font-family: Verdana, Arial, Helvetica, sans-serif" class=""><div class="">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 class=""></div><div class=""><br class=""></div><div class="">Here is the background/motivation.<br class=""></div><div class=""><br class=""></div><div class="">At <a href="http://menmachinesmaterials.com/SeasideDoc" target="_blank" class="">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 class=""></div><div class=""><br class=""></div><div class="">The reason is that I use NGinx locations to tell                     where to look for resources.<br class=""></div><div class=""><br class=""></div><div class="">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 class=""></div><div class=""><br class=""></div><div class="">The TBS and JQuery FileLibraries are 'self                     contained' and the css and js is not delivered via                     Nginx.<br class=""></div><div class=""><br class=""></div><div class="">I am in the process of creating an additional                     library for TBS that uses my convention...but...<br class=""></div><div class=""><br class=""></div><div class="">I just discovered the "deployFiles' method and it                     does do a nice dump of the files I need...but then                     what?<br class=""></div><div class=""><br class=""></div><div class="">Does Seaside standard dev practice include                     "switching to another library" that automatically                     routes to those urls that I am missing? <br class=""></div><div class=""><br class=""></div><div class="">thx in advance.<br class=""></div><div class=""><br class=""></div><div class="">t<br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></div><div class=""><br class=""></div><div class=""><br class=""></div><pre class="">_______________________________________________
seaside mailing list
<a target="_blank" href="mailto:seaside@lists.squeakfoundation.org" class="">seaside@lists.squeakfoundation.org</a>
<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=""></pre></blockquote></blockquote></div><div class=""><br class=""></div></div><div class=""><br class=""></div><div class=""><br class=""></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 class=""></pre></blockquote><p class=""><br class=""></p><div class=""><br class=""></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 class=""></pre></blockquote></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>