lua_package_path "/usr/local/lib/lua/5.1/?.lua;/srv/resty-gitweb/?.lua;;"; lua_package_cpath "/usr/local/lib/lua/5.1/?.so;;"; init_by_lua_file /srv/resty-gitweb/init.lua; server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name git.joshstock.in; rewrite ^/(.*)/(\?.*)?$ /$1$2 permanent; error_page 404 /error/404.html; location = /error/404.html { root /var/www/josh/static; } location / { default_type text/html; content_by_lua_file /srv/resty-gitweb/app.lua; } location = /favicon.ico { root /var/www/josh; try_files /static/favicon.ico =404; } location = /static/favicon.png { root /var/www/josh; } location ~ ^/([^\/]*)\.git { fastcgi_intercept_errors on; fastcgi_pass unix:/var/run/fcgiwrap.socket; include fastcgi_params; fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend; fastcgi_param GIT_HTTP_EXPORT_ALL ""; fastcgi_param GIT_PROJECT_ROOT /home/git; fastcgi_param PATH_INFO $uri; } }