53 lines
1.3 KiB
Plaintext
53 lines
1.3 KiB
Plaintext
server {
|
|
listen 80;
|
|
server_name git.sp.renatorosa.com;
|
|
|
|
root /usr/share/gitweb;
|
|
|
|
location ~ ^.*\.git/(HEAD|info/refs|objects/info/.*|git-(upload|receive)-pack)$ {
|
|
root /var/lib/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/lib/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;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
# location ~ ^.*\.git/(HEAD|info/refs|objects/info/.*|git-(upload|receive)-pack)$ {
|
|
# root /var/lib/git;
|
|
# try_files $uri /index.cgi;
|
|
# }
|
|
#
|
|
# location /index.cgi {
|
|
# root /usr/share/gitweb/;
|
|
# root /var/lib/git;
|
|
# include fastcgi_params;
|
|
# gzip off;
|
|
# fastcgi_param SCRIPT_NAME $uri;
|
|
# fastcgi_param GITWEB_CONFIG /etc/gitweb.conf;
|
|
# fastcgi_pass unix:/var/run/fcgiwrap.socket;
|
|
# }
|
|
#
|
|
# location / {
|
|
# root /usr/share/gitweb/;
|
|
# root /var/lib/git;
|
|
# index index.cgi;
|
|
# }
|
|
#}
|
|
|