summaryrefslogtreecommitdiff
path: root/public/fs/etc/nginx/vhosts.d/git.midipix.org.conf
blob: 4b014be7d40fe9d18f4c683aa3dd0455628e68f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
server {
    listen                [::]:80;
    server_name           git.midipix.org;
    return                301 https://$server_name$request_uri;
}

server {
    listen                [::]:443;
    server_name           git.midipix.org;
    root                  /srv/www/htdocs;

    location /cgit.cgi {
        rewrite           ^/cgit.cgi(/.*)$ $1 last;
    }

    location / {
        try_files         $uri @cgit;
    }

    location @cgit {
        include           uwsgi_params;
        uwsgi_modifier1   9;
        uwsgi_pass        unix:/run/uwsgi/cgit.socket;

        uwsgi_param       CGIT_CONFIG     "/etc/cgit.d/cgitrc.midipix.org";
        uwsgi_param       PATH_INFO       $uri;
        uwsgi_param       QUERY_STRING    $args;
        uwsgi_param       HTTP_HOST       $server_name;
        uwsgi_param       SCRIPT_FILENAME $document_root/cgit.cgi;
    }

    ssl_certificate       /etc/nginx/certs.d/culturestrings.org/ssl/fullchain.pem;
    ssl_certificate_key   /etc/nginx/certs.d/culturestrings.org/ssl/privkey.pem;

    include conf.d/ssl_params;
}