Add static web directory for cgit & initial files
Create and define a static directory for cgit to use. Add initial favicon and logo files and include in cgitrc. Also include custom CSS and background image. Change-Id: If1e20d8e62557cc90aafbf92f4291b964400e029
This commit is contained in:
parent
f01c2266b1
commit
5b7df9f70a
@ -17,6 +17,8 @@
|
|||||||
class cgit(
|
class cgit(
|
||||||
$vhost_name = $::fqdn,
|
$vhost_name = $::fqdn,
|
||||||
$serveradmin = "webmaster@${::fqdn}",
|
$serveradmin = "webmaster@${::fqdn}",
|
||||||
|
$cgitdir = '/var/www/cgit',
|
||||||
|
$staticfiles = '/var/www/cgit/static',
|
||||||
$ssl_cert_file = '',
|
$ssl_cert_file = '',
|
||||||
$ssl_key_file = '',
|
$ssl_key_file = '',
|
||||||
$ssl_chain_file = '',
|
$ssl_chain_file = '',
|
||||||
@ -81,6 +83,7 @@ class cgit(
|
|||||||
priority => '50',
|
priority => '50',
|
||||||
template => 'cgit/git.vhost.erb',
|
template => 'cgit/git.vhost.erb',
|
||||||
ssl => true,
|
ssl => true,
|
||||||
|
require => [ File[$staticfiles], Package['cgit'] ],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/etc/httpd/conf.d/ssl.conf':
|
file { '/etc/httpd/conf.d/ssl.conf':
|
||||||
@ -92,6 +95,21 @@ class cgit(
|
|||||||
require => Package['mod_ssl'],
|
require => Package['mod_ssl'],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
file { $cgitdir:
|
||||||
|
ensure => directory,
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
mode => '0755',
|
||||||
|
}
|
||||||
|
|
||||||
|
file { $staticfiles:
|
||||||
|
ensure => directory,
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
mode => '0755',
|
||||||
|
require => File[$cgitdir],
|
||||||
|
}
|
||||||
|
|
||||||
file { '/etc/xinetd.d/git':
|
file { '/etc/xinetd.d/git':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
Alias /cgit-data /usr/share/cgit
|
Alias /cgit-data /usr/share/cgit
|
||||||
ScriptAlias /cgit /var/www/cgi-bin/cgit
|
ScriptAlias /cgit /var/www/cgi-bin/cgit
|
||||||
|
Alias /static <%= scope.lookupvar("cgit::staticfiles") %>
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
RewriteRule ^/$ /cgit [R]
|
RewriteRule ^/$ /cgit [R]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user