# From https://esc.sh/blog/setting-up-a-git-http-server-with-nginx/ server { listen 443; server_name eehouse.org; # This is where the repositories live on the server root /var/www/html/gitrepos; ssl_certificate /etc/letsencrypt/live/eehouse.org/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/eehouse.org/privkey.pem; include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot location ~ (/.*) { include fastcgi_params; fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend; # export all repositories under GIT_PROJECT_ROOT fastcgi_param GIT_HTTP_EXPORT_ALL ""; fastcgi_param GIT_PROJECT_ROOT /var/www/html/gitrepos; fastcgi_param PATH_INFO $1; } }