| server { |
| listen 80; |
| server_name slavealloc-staging.build.mozilla.org slavealloc-staging; |
| |
| # proxy the API to the Twisted daemon |
| location ~ ^/(api|gettac) { |
| proxy_set_header X-Real-IP $remote_addr; |
| proxy_redirect false; |
| proxy_pass http://127.0.0.1:1079; |
| } |
| |
| # serve the UI directly |
| location /ui { |
| # note that this path depends on slavealloc being installed with pip |
| alias /tools/slavealloc-staging/src/tools/lib/python/slavealloc/www; |
| } |
| |
| # and redirect / to /ui |
| location = / { |
| rewrite ^(.*) /ui permanent; |
| } |
| } |