server { | |
listen 80; | |
server_name slavealloc.build.mozilla.org slavealloc; | |
# 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:1080; | |
} | |
# serve the UI directly | |
location /ui { | |
# note that this path depends on slavealloc being installed with pip | |
alias /tools/slavealloc/src/tools/lib/python/slavealloc/www; | |
} | |
# and redirect / to /ui | |
location = / { | |
rewrite ^(.*) /ui permanent; | |
} | |
} |