diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-12-29 22:09:24 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-12-29 22:14:04 +0100 |
commit | c81ce634d0351a658b5490f64d3982fd43ceb2d3 (patch) | |
tree | 4e25fb4c8eca9f293d6abbf7e41ce5df6a7f117b /manifests/site.pp | |
parent | Cgit trailing commas. (diff) | |
download | webdav_server-c81ce634d0351a658b5490f64d3982fd43ceb2d3.tar.gz webdav_server-c81ce634d0351a658b5490f64d3982fd43ceb2d3.tar.xz |
cgit
Diffstat (limited to '')
-rw-r--r-- | manifests/site.pp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/manifests/site.pp b/manifests/site.pp index 4abad27..4f3d0ae 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -164,6 +164,7 @@ node 'hornquist.se' { auth_filter => 'hugo-authentication.lua', source_filter => 'hugo-highlighting.sh', scan_path => '/home/git/git', + enable_http_clone => false, clone_url => [ 'https://git.hornquist.se/$CGIT_REPO_URL', 'https://$HTTP_HOST$SCRIPT_NAME/$CGIT_REPO_URL', @@ -320,13 +321,13 @@ node 'hornquist.se' { access_log => 'absent', error_log => 'absent', index_files => [], - try_files => [ '$uri', '@cgit' ], + try_files => [ '$uri', '@cgit' ], ssl => true, ssl_cert => "/etc/letsencrypt/live/${certname}/fullchain.pem", ssl_key => "/etc/letsencrypt/live/${certname}/privkey.pem", use_default_location => true, www_root => $cgit_root, - ssl_redirect => true, + ssl_redirect => true, # /usr/lib/cgit/cgit.cgi # /usr/share/cgit/cgit.css } @@ -345,7 +346,14 @@ node 'hornquist.se' { ], } - # TODO extra locations for dumb git clones? + nginx::resource::location { '~ \.git$': + server => 'cgit', + www_root => $cgit::scan_path, + location_cfg_append => { + auth_basic => '"CGit login"', + auth_basic_user_file => '/.htpasswd', + } + } nginx::resource::location { '/': try_files => ['$uri', '$uri/', '=404'], |