diff options
Diffstat (limited to 'etc/apache2/conf-available/local-cgit.conf')
-rw-r--r-- | etc/apache2/conf-available/local-cgit.conf | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/etc/apache2/conf-available/local-cgit.conf b/etc/apache2/conf-available/local-cgit.conf new file mode 100644 index 0000000..f307242 --- /dev/null +++ b/etc/apache2/conf-available/local-cgit.conf @@ -0,0 +1,28 @@ +Define FEATUREWEBROOT /usr/local/share/feature/source-hosting/web/ + +AddDefaultCharset UTF-8 + +<Directory /usr/share/cgit> + Options None + AllowOverride None + Require all granted +</Directory> + +<Directory ${FEATUREWEBROOT}> + Options None + AllowOverride None + Require all granted +</Directory> + +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 + +<LocationMatch ^/(?![^./]+\.git/|cgit-css/.*|cgit-local/.*|favicon\.ico|robots\.txt|\.well-known/acme-challenge/)> + ProxyPass unix:/run/uwsgi/app/local-git/socket|uwsgi://local-git +</LocationMatch> |