-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
41 lines (32 loc) · 1.08 KB
/
nginx.conf
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
37
38
39
40
41
pcre_jit on;
error_log /dev/stderr;
events {
worker_connections 1024;
}
http {
# include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
# Handle /git paths with `git-http-backend`
location ~ /git(/.*) {
fastcgi_pass unix:/var/run/fcgiwrap.sock;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param REMOTE_USER "git";
fastcgi_param REMOTE_ADDR "crates";
fastcgi_param SCRIPT_FILENAME /usr/libexec/git-core/git-http-backend;
fastcgi_param GIT_HTTP_EXPORT_ALL "";
fastcgi_param GIT_PROJECT_ROOT /data/git;
fastcgi_param PATH_INFO $1;
}
# Proxy everything else to Ktra.
location / {
proxy_pass http://127.0.0.1:8000;
}
}
}