Created
September 6, 2023 19:53
-
-
Save cacharle/e4e6d93710c45ee6a33a1f31d1b91b4c to your computer and use it in GitHub Desktop.
cgit configuration files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
root /usr/share/cgit; | |
try_files $uri @cgit; | |
location ~ /.+/(info/refs|git-upload-pack) { | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend; | |
fastcgi_param PATH_INFO $uri; | |
fastcgi_param GIT_HTTP_EXPORT_ALL 1; | |
fastcgi_param GIT_PROJECT_ROOT /var/git; | |
fastcgi_param HOME /var/git; | |
fastcgi_pass unix:/run/fcgiwrap.socket; | |
} | |
location @cgit { | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME /usr/lib/cgit/cgit.cgi; | |
fastcgi_param PATH_INFO $uri; | |
fastcgi_param QUERY_STRING $args; | |
fastcgi_param HTTP_HOST $server_name; | |
fastcgi_pass unix:/run/fcgiwrap.socket; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
css=/cgit.css | |
logo=/cgit.png | |
virtual-root=/ | |
clone-prefix=http://foo.com | |
root-title=Charles' git server | |
root-desc=A web interface to my git repositories, powered by Cgit | |
readme=master:README.md | |
# HAS to be last | |
scan-path=/var/git/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment