summaryrefslogtreecommitdiff
path: root/git-server/cgit/nginx.conf
blob: 64e35cb8100dbcec246f3f08b8a7a3af0bdc9c3f (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
daemon off;
worker_processes 1;
error_log /var/log/nginx/error.log warn;

events {
    worker_connections 128;
}

http {
    include /etc/nginx/mime.types;
    default_type application/octet-stream;
    sendfile on;

    server {
        listen 80;
        server_name _;

        # Serve cgit static assets directly
        location /cgit-css/ {
            alias /usr/share/webapps/cgit/;
        }

        location / {
            fastcgi_pass unix:/var/run/fcgiwrap.socket;
            fastcgi_param SCRIPT_FILENAME /usr/share/webapps/cgit/cgit.cgi;
            fastcgi_param PATH_INFO $uri;
            fastcgi_param QUERY_STRING $query_string;
            fastcgi_param HTTP_HOST $server_name;
            include /etc/nginx/fastcgi_params;
        }
    }
}