22 lines
718 B
Plaintext
22 lines
718 B
Plaintext
location ~ ^.*\.git/(HEAD|info/refs|objects/info/.*|git-(upload|receive)-pack)$ {
|
|
root /var/www/web.git;
|
|
|
|
fastcgi_pass unix:/var/run/fcgiwrap.socket;
|
|
fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
|
|
fastcgi_param PATH_INFO $uri;
|
|
fastcgi_param GIT_PROJECT_ROOT /var/www/web.git;
|
|
include fastcgi_params;
|
|
}
|
|
|
|
# send anything else to gitweb if it's not a real file
|
|
try_files $uri @gitweb;
|
|
location @gitweb {
|
|
fastcgi_pass unix:/var/run/fcgiwrap.socket;
|
|
fastcgi_param SCRIPT_FILENAME /usr/share/gitweb/gitweb.cgi;
|
|
fastcgi_param PATH_INFO $uri;
|
|
fastcgi_param GITWEB_CONFIG /etc/nginx/gitweb.conf;
|
|
include fastcgi_params;
|
|
}
|
|
}
|
|
|