]> git.somenet.org - root/pub/somesible.git/blob - roles/service/gitweb/vars/default/vars_nginx_vhost_custom.yml
[roles/service/sympa] Mailinglist service
[root/pub/somesible.git] / roles / service / gitweb / vars / default / vars_nginx_vhost_custom.yml
1 #####################################
2 ### someone"s ansible provisioner ###
3 #####################################
4 # Part of: https://git.somenet.org/root/pub/somesible.git
5 # 2017-2024 by someone <someone@somenet.org>
6 #
7 ---
8 vhost_custom_pre_server: |-
9
10 vhost_custom: |-
11     # clone via https
12     location ~ ^.*\.git/(HEAD|info/refs|objects/.*|git-(upload|receive)-pack)$ {
13         root /srv/gitolite/repositories/;
14         include fastcgi_params;
15         fastcgi_param SCRIPT_FILENAME   /usr/lib/git-core/git-http-backend;
16         fastcgi_param PATH_INFO         $uri;
17         fastcgi_param GIT_PROJECT_ROOT  /srv/gitolite/repositories/;
18         fastcgi_pass unix:/run/fcgiwrap.socket;
19     }
20
21     # gitweb
22     root /usr/share/gitweb;
23     try_files $uri @gitweb;
24     location @gitweb {
25         gzip off;
26         include fastcgi_params;
27         fastcgi_param   SCRIPT_FILENAME   /usr/share/gitweb/gitweb.cgi;
28         fastcgi_param   PATH_INFO         $uri;
29         fastcgi_param   GITWEB_CONFIG /etc/gitweb/public.conf;
30         fastcgi_pass    unix:/run/fcgiwrap.socket;
31     }
32
33     # remote trailing slashes from path
34     location ~ ^/(.*)/$ {
35         rewrite ^/(.*)/$ /$1 permanent;
36     }