diff options
author | Jonas Smedegaard <dr@jones.dk> | 2020-08-13 19:21:14 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2020-08-13 19:21:14 +0200 |
commit | 95862f2b20c81294413824ec2dd00f9b17905994 (patch) | |
tree | 828217c395c60630070510ee247e323861260b86 /etc/apache2/conf-available/local-cgit.conf |
initial commit
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> |