uwsgi on Balkian's site /tags/uwsgi/ Recent content in uwsgi on Balkian's site Hugo -- gohugo.io en-us This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Thu, 09 Oct 2014 10:00:00 +0000 Proxies with Apache and python /post/2014-10-09-proxies/ Thu, 09 Oct 2014 10:00:00 +0000 /post/2014-10-09-proxies/ <p>This is a quick note on proxying a local python application (e.g. flask) to a subdirectory in Apache. This assumes that the file wsgi.py contains a WSGI application with the name <em>application</em>. Hence, wsgi:application.</p> <h2 id="gunicorn">Gunicorn</h2> <div class="highlight"><div style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"> <table style="border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;"><tr><td style="vertical-align:top;padding:0;margin:0;border:0;"> <pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1 </span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">2 </span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">3 </span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">4 </span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">5 </span></code></pre></td> <td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%"> <pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-apache" data-lang="apache"><span style="color:#f92672">&lt;Location</span> <span style="color:#e6db74">/myapp/</span><span style="color:#f92672">&gt;</span> ProxyPass http://127.0.0.1:8888/myapp/ ProxyPassReverse http://127.0.0.1:8888/myapp/ RequestHeader set SCRIPT_NAME <span style="color:#e6db74">&#34;/myapp/&#34;</span> <span style="color:#f92672">&lt;/Location</span><span style="color:#e6db74"></span><span style="color:#f92672">&gt;</span> </code></pre></td></tr></table> </div> </div>