-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnginx.conf
39 lines (32 loc) · 1.06 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
server {
listen 80;
server_name localhost;
server_tokens off;
error_log /var/log/nginx/error.log debug;
# Use main landing page for GitWeb
location / {
root /usr/share/gitweb;
index gitweb.cgi;
}
location /gitweb.cgi {
include fastcgi_params;
gzip off;
fastcgi_param SCRIPT_FILENAME /usr/share/gitweb/gitweb.cgi;
fastcgi_param GITWEB_CONFIG /etc/gitweb.conf;
fastcgi_pass unix:/run/fcgiwrap/fcgiwrap.sock;
}
# Use URLs with '.git' to serve repositories over HTTP
location ~ .*\.git/ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /usr/libexec/git-core/git-http-backend;
fastcgi_param GIT_PROJECT_ROOT /srv/git;
fastcgi_param GIT_HTTP_EXPORT_ALL "";
fastcgi_param PATH_INFO $uri;
fastcgi_pass unix:/run/fcgiwrap/fcgiwrap.sock;
}
# Redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}