# CLEARNET server { access_log /var/log/nginx/cgit.access.log; server_name cgit.zzls.xyz; include configs/general.conf; include configs/security.conf; root /usr/share/cgit; try_files $uri @cgit; # Configure HTTP transport #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 /srv/git; # fastcgi_param HOME /srv/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; } listen 443 ssl; http2 on; } server { if ($host = cgit.zzls.xyz) { return 301 https://$host$request_uri; } listen 80; server_name cgit.zzls.xyz; }