Define FEATUREWEBROOT /usr/local/share/feature/source-hosting/web/ AddDefaultCharset UTF-8 Options None AllowOverride None Require all granted Options None AllowOverride None Require all granted Alias /cgit-css/ /usr/share/cgit/ Alias /favicon.ico /usr/share/cgit/favicon.ico Alias /robots.txt /usr/share/cgit/robots.txt Alias /cgit-feature/ ${FEATUREWEBROOT} # this requires cgit config: enable-index-links=1 RedirectMatch permanent ^/([^./]+)\.git(/.*) /$1$2 ProxyPass unix:/run/uwsgi/app/local-git/socket|uwsgi://local-git