Note that there are some explanatory texts on larger screens.

plurals
  1. PONginx conf for two gunicorn applications (django and tilestache)
    primarykey
    data
    text
    <p>I'm trying to host a site that consists of a django app and map tiles served by tilestache. I can get them running and serving content separately by using either </p> <pre><code>gunicorn_django -b 0.0.0.0:8000 </code></pre> <p>for the django app, or</p> <pre><code>gunicorn "TileStache:WSGITileServer('tilestache.cfg')" </code></pre> <p>for tilestache. I've tried daemonizing the django app and running them at the same time with the tilestache process on a different port (<code>8080</code>), but tilestache doesn't work. I assume the issue lies in my nginx conf:</p> <pre><code>server { listen 80; server_name localhost; access_log /opt/django/logs/nginx/vc_access.log; error_log /opt/django/logs/nginx/vc_error.log; # no security problem here, since / is alway passed to upstream root /opt/django/; # serve directly - analogous for static/staticfiles location /media/ { # if asset versioning is used if ($query_string) { expires max; } } location /static/ { # if asset versioning is used if ($query_string) { expires max; } } location / { proxy_pass_header Server; proxy_set_header Host $http_host; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Scheme $scheme; proxy_connect_timeout 10; proxy_read_timeout 10; proxy_pass http://localhost:8000/; } # what to serve if upstream is not available or crashes error_page 500 502 503 504 /media/50x.html; } </code></pre> <p>Can I just add another <code>server</code> block in the conf for <code>proxy_pass http://localhost:8080/</code>? Additionally, I'm very new to this stack (I've relied greatly on <a href="https://stackoverflow.com/users/249372/adrian-deccico">Adrián Deccico</a>'s tutorial <a href="http://adrian.org.ar/python/django-nginx-green-unicorn-in-an-ubuntu-11-10-ec2-instance" rel="nofollow noreferrer">here</a> to get the django part up and running) so any "woah that's an obvious mistake" or suggestions would be greatly appreciated. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload