Blob Blame History Raw
server {
    listen                [::]:80;
    server_name           @sitesubd@;
    return                301 https://$server_name$request_uri;
}

server {
    listen                [::]:443;
    server_name           @sitesubd@;
    root                  /srv/www/htdocs;


    access_log  /var/log/nginx/pagure_access.log;
    error_log   /var/log/nginx/pagure_error.log;


    location @pagure {
        proxy_set_header  Host $http_host;
        proxy_set_header  X-Real-IP $remote_addr;
        proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header  X-Forwarded-Proto $scheme;
        proxy_pass        http://unix:/tmp/.pagure_web.sock;
    }

    location / {
        try_files $uri @pagure;
    }

    location /static {
        alias /usr/lib/python3.6/site-packages/pagure/static/;
    }

    location /releases {
        alias     /srv/www/pagure-releases/;
        autoindex on;
    }

    ssl_certificate           /srv/webroot/@sitezone@/ssl/fullchain.pem;
    ssl_certificate_key       /srv/webroot/@sitezone@/ssl/privkey.pem;
    ssl_trusted_certificate   /srv/webroot/@sitezone@/ssl/chain.pem;

    include conf.d/ssl_params;
}