O nginx apenas ficava na frente do Tornado, assumindo assim a configuração do proxy padrão (as páginas do Tornado devem listar uma configuração básica do nginx).
A configuração de curinga seria a seguinte (gravada a partir de aqui ):
server {
# Replace this port with the right one for your requirements
listen 80;
# Multiple hostnames separated by spaces. Replace these as well.
server_name star.yourdomain.com *.yourdomain.com www.*.yourdomain.com;
root /PATH/TO/yourdomain.com/$host;
error_page 404 http://yourdomain.com/errors/404.html;
access_log logs/access.log;
location / {
root /PATH/TO/yourdomain.com/$host/;
index index.php;
}
# serve static files directly
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|html)$ {
access_log off;
expires 30d;
}
location / {
# insert the various proxy pass directives
}
}