Source

sprintsite / components / nginx / sprintsite.conf

Full commit
server {
    listen ${component.address.listen};
    server_name ${component.server_name};

    # Ensure canonical hostname
    if ($host != $server_name) {
        rewrite (.*) http://$server_name$1 permanent;
    }

    # disallow hidden files (and prevent various path-based attacks)
    location ~ /\. {
        deny all;
        access_log off;
        log_not_found off;
    }

    # the following standard files may not exists
    location = /favicon.ico {
        log_not_found off;
    }

    location = /robots.txt {
        allow all;
        log_not_found off;
    }

    location / {
        proxy_pass http://${component.haproxy.connect};
    }

}