diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-10-11 01:37:14 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-10-11 01:37:14 +0200 |
commit | ac1951dbd2fa9d28d0dbfcf81d7432768c4614e1 (patch) | |
tree | 2483020995a5865441e8e5488ac6237f25e419dc /manifests/nginx.pp | |
parent | Fix missing letter. (diff) | |
download | cgit-ac1951dbd2fa9d28d0dbfcf81d7432768c4614e1.tar.gz cgit-ac1951dbd2fa9d28d0dbfcf81d7432768c4614e1.tar.xz |
general cleanup.
Diffstat (limited to 'manifests/nginx.pp')
-rw-r--r-- | manifests/nginx.pp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/manifests/nginx.pp b/manifests/nginx.pp index d62229f..7146e05 100644 --- a/manifests/nginx.pp +++ b/manifests/nginx.pp @@ -2,7 +2,7 @@ class cgit::nginx { if ($cgit::certname == undef) { nginx::resource::server { 'cgit': - server_name => [ $cgit::server_name, ], + server_name => [ $cgit::server_name, ], access_log => 'absent', error_log => 'absent', index_files => [], @@ -13,7 +13,7 @@ class cgit::nginx { } } else { nginx::resource::server { 'cgit': - server_name => [ $cgit::server_name, ], + server_name => [ $cgit::server_name, ], access_log => 'absent', error_log => 'absent', index_files => [], @@ -29,23 +29,23 @@ class cgit::nginx { nginx::resource::location { '@cgit': fastcgi_params => 'fastcgi_params', - fastcgi_param => { + fastcgi_param => { 'SCRIPT_FILENAME' => '/usr/lib/cgit/cgit.cgi', - 'PATH_INFO' => '$fastcgi_script_name', - 'QUERY_STRING' => '$args', + 'PATH_INFO' => '$fastcgi_script_name', + 'QUERY_STRING' => '$args', }, - ssl_only => $cgit::certname != undef, - fastcgi => 'unix:/run/fcgiwrap.socket', - server => [ + ssl_only => $cgit::certname != undef, + fastcgi => 'unix:/run/fcgiwrap.socket', + server => [ 'cgit', - ], + ], } file { $cgit::htpasswd: ensure => file, content => $cgit::users.map |$user| { [$user['name'], $user['pass']].join(':') - }.join("\n") + }.join("\n") } # TODO each repo name should be regex-escaped @@ -57,7 +57,7 @@ class cgit::nginx { priority => 450, fastcgi => 'unix:/run/fcgiwrap.socket', fastcgi_params => 'fastcgi_params', - fastcgi_param => { + fastcgi_param => { 'SCRIPT_FILENAME' => '/usr/lib/git-core/git-http-backend', 'GIT_PROJECT_ROOT' => $cgit::scan_path, 'GIT_HTTP_EXPORT_ALL' => '""', @@ -67,15 +67,15 @@ class cgit::nginx { nginx::resource::location { '~ (.*\.git/.*)': - server => 'cgit', - ssl_only => $cgit::certname != undef, - location_cfg_append => { + server => 'cgit', + ssl_only => $cgit::certname != undef, + location_cfg_append => { auth_basic => '"CGit login"', auth_basic_user_file => $cgit::htpasswd, }, - fastcgi => 'unix:/run/fcgiwrap.socket', - fastcgi_params => 'fastcgi_params', - fastcgi_param => { + fastcgi => 'unix:/run/fcgiwrap.socket', + fastcgi_params => 'fastcgi_params', + fastcgi_param => { 'SCRIPT_FILENAME' => '/usr/lib/git-core/git-http-backend', 'GIT_PROJECT_ROOT' => $cgit::scan_path, 'GIT_HTTP_EXPORT_ALL' => '""', |