Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>As far as I see - you have mapped <code>location /</code> to go to <code>localhost:8000</code>. When you have 2 different upstreams, you'll need two different location mappings, one for each upstream. So assuming that the django app is the primary site on your domain, you'll have the default location as it is now:</p> <pre><code>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/; } </code></pre> <p>but then add another location for the other app:</p> <pre><code>location /tilestache { 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:8080/; } </code></pre> <p>The only difference here is the port. This way the domain.com/tilestache will be processed by <code>localhost:8080</code>, while all other addresses will default to the django app at <code>localhost:8000</code>. Place the <code>location /tilstache</code> before <code>location /</code>.</p> <p>For clarity you can define your upstreams like this:</p> <pre><code>upstream django_backend { server localhost:8000; } upstream tilestache_backend { server localhost:8080; } </code></pre> <p>and then in <code>location</code> section, use:</p> <pre><code>location / { ..... proxy_pass http://django_backend; } location /tilestache { ..... proxy_pass http://tilestache_backend; } </code></pre>
 

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