summaryrefslogtreecommitdiff
path: root/roles/gitserver/files/git.ilvokhin.com
blob: 5e30e36bbb34584a13431af1359a990f39d74ec7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
server {
    server_name git.ilvokhin.com;

    # Asterisk (*) is here to match both git.conf and cgit.conf (if the latter
    # exists), because cgit comes with a separate role, but they share one
    # server (git.ilvokhin.com) for usage convenience.
    include includes/*git.conf;

    listen 443 ssl;
    ssl_certificate /etc/letsencrypt/live/git.ilvokhin.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/git.ilvokhin.com/privkey.pem;
}

server {
    if ($host = git.ilvokhin.com) {
        return 301 https://$host$request_uri;
    }

    server_name git.ilvokhin.com;
    listen 80;

    return 404;
}