server { listen 80; server_name git.dybiec.info; return 301 https://$server_name$request_uri; } server { listen 443 ssl http2; server_name git.dybiec.info; location ~* ^.+(cgit.(css|png)|favicon.ico|robots.txt) { root /usr/share/cgit/; } location / { try_files $uri @cgit; } location @cgit { gzip off; include uwsgi_params; uwsgi_modifier1 9; uwsgi_pass unix:/run/uwsgi/cgit.sock; } }