diff options
author | 2024-08-25 20:08:53 +0100 | |
---|---|---|
committer | 2024-08-25 23:14:45 +0100 | |
commit | be62ed518a2244c54e06fd3c46ca6e0172e02811 (patch) | |
tree | 5e7b9aa2dc110e9195a0c7a91c10d07c0cbd5416 | |
parent | Add script for updating mirrors in a cronjob (diff) |
Add template NGINX service for cgit deployment
-rw-r--r-- | ansible/roles/git-mirrors/templates/nginx-site.conf.j2 | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ansible/roles/git-mirrors/templates/nginx-site.conf.j2 b/ansible/roles/git-mirrors/templates/nginx-site.conf.j2 new file mode 100644 index 0000000..c20b8fc --- /dev/null +++ b/ansible/roles/git-mirrors/templates/nginx-site.conf.j2 @@ -0,0 +1,25 @@ +server { + server_name {{ git_mirrors_nginx_url }}; + + listen 443 ssl http2; + listen [::]:443 ssl http2; + + ssl_certificate {{ git_mirrors_nginx_cert_file }}; + ssl_certificate_key {{ git_mirrors_nginx_cert_key }}; + + access_log /var/log/nginx/cgit-access.log; + error_log /var/log/nginx/cgit-error.log; + + root /usr/share/cgit; + try_files $uri @cgit; + + location @cgit { + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME /usr/lib/cgit/cgit.cgi; + fastcgi_pass unix:/run/fcgiwrap.socket; + + fastcgi_param PATH_INFO $uri; + fastcgi_param QUERY_STRING $args; + fastcgi_param HTTP_HOST $server_name; + } +} |