<div>
<font face="'Courier New'">Maybe try setting </font><span style="font-family: 'Courier New'; ">location /hello and /world would help?</span></div>
<div><div><br></div><font face="Calibri"><span style="font-size: 16px;">Thanks,</span></font><div><font face="Calibri"><span style="font-size: 16px;">Ruben Tan</span></font></div><div><br></div></div>
<p style="color: #A0A0A8;">On Monday, October 7, 2013 at 1:27 PM, Jabba Laci wrote:</p>
<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
<span><div><div><div>Hi,</div><div><br></div><div>I'm new to the list. I started to learn the Python web framework Flask</div><div>and I would like to try it in production environment too. I managed to</div><div>bring Flask together with uwsgi and nginx. My Flask application is</div><div>available at the address localhost:81 .</div><div><br></div><div>I would like to add several applications and I want them to be</div><div>available under different URLs. For instance, if I have two projects</div><div>called "hello" and "world", I want to access them as</div><div>localhost:81/hello/ and localhost:81/world/ . The problem is I can't</div><div>figure out how to configure nginx for this.</div><div><br></div><div>Here is my current setup:</div><div><br></div><div>* The project "hello" is in this directory: /home/jabba/public_pyapps/hello/</div><div>* Its nginx entry:</div><div><br></div><div>server {</div><div> listen 81;</div><div> server_name localhost;</div><div> charset utf-8;</div><div> client_max_body_size 75M;</div><div><br></div><div> location / { try_files $uri @yourapplication; }</div><div> location @yourapplication {</div><div> include uwsgi_params;</div><div> uwsgi_pass unix:/home/jabba/public_pyapps/hello/hello_uwsgi.sock;</div><div> }</div><div>}</div><div><br></div><div>It's available at localhost:81 .</div><div><br></div><div>Questions:</div><div><br></div><div>(1) How to make it available under localhost:81/hello/ instead?</div><div><br></div><div>(2) If I add a new application (e.g. "world") next to previous ones,</div><div>how to add it to nginx?</div><div><br></div><div>Thanks,</div><div><br></div><div>Laszlo</div><div><br></div><div>_______________________________________________</div><div>nginx mailing list</div><div><a href="mailto:nginx@nginx.org">nginx@nginx.org</a></div><div><a href="http://mailman.nginx.org/mailman/listinfo/nginx">http://mailman.nginx.org/mailman/listinfo/nginx</a></div></div></div></span>
</blockquote>
<div>
<br>
</div>