server { listen 80 default_server; listen [::]:80 default_server; server_name _; location / { index index.html; } location /cgit/ { alias /usr/share/cgit/; } location /git/ { include fastcgi_params; fastcgi_pass unix:/run/fcgiwrap.sock; fastcgi_param CGIT_CONFIG /etc/cgit/cgitrc; fastcgi_param SCRIPT_FILENAME /usr/lib/cgit/cgit.cgi; fastcgi_split_path_info ^(/git/?)(.+)$; fastcgi_param PATH_INFO $fastcgi_path_info; } }