From 7d3a421c5c62c4a81d317acccd4a83a719557078 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 9 Jan 2009 01:52:28 +0000 Subject: fixed config --- files/web/lighttpd-gitweb-defaults.conf | 10 ---------- files/web/lighttpd.conf | 3 +-- manifests/web/lighttpd.pp | 10 ---------- templates/web/lighttpd | 13 ++++++++++++- 4 files changed, 13 insertions(+), 23 deletions(-) delete mode 100644 files/web/lighttpd-gitweb-defaults.conf diff --git a/files/web/lighttpd-gitweb-defaults.conf b/files/web/lighttpd-gitweb-defaults.conf deleted file mode 100644 index f653838..0000000 --- a/files/web/lighttpd-gitweb-defaults.conf +++ /dev/null @@ -1,10 +0,0 @@ -url.redirect += ( - "^$" => "/", -) - -alias.url += ( - "/" => "/var/www/git/gitweb.cgi", - "/gitweb.css" => "/var/www/git/gitweb.css", - "/git-logo.png" => "/var/www/git/git-logo.png", - "/git-favicon.png" => "/var/www/git/git-favicon.png", -) diff --git a/files/web/lighttpd.conf b/files/web/lighttpd.conf index 475d6ff..2f77c97 100644 --- a/files/web/lighttpd.conf +++ b/files/web/lighttpd.conf @@ -13,7 +13,7 @@ # - saves memory server.modules = ( "mod_rewrite", -# "mod_redirect", + "mod_redirect", "mod_alias", "mod_access", # "mod_cml", @@ -319,7 +319,6 @@ server.groupname = "lighttpd" #include /etc/lighttpd/lighttpd-inc.conf ## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf" #include "lighttpd-inc.conf" -include "lighttpd-gitweb-defaults.conf" include "lighttpd-gitweb.conf" #### include_shell diff --git a/manifests/web/lighttpd.pp b/manifests/web/lighttpd.pp index 0901442..1a0e942 100644 --- a/manifests/web/lighttpd.pp +++ b/manifests/web/lighttpd.pp @@ -2,16 +2,6 @@ class git::web::lighttpd { include lighttpd include lighttpd::base::git::web - file{'/etc/lighttpd/lighttpd-gitweb-defaults.conf': - source => [ "puppet://$server/files/git/web/${fqdn}/lighttpd-gitweb-defaults.conf", - "puppet://$server/files/git/web/lighttpd-gitweb-defaults.conf", - "puppet://$server/git/web/lighttpd-gitweb-defaults.conf" ], - require => Package['lighttpd'], - notify => Service['lighttpd'], - owner => root, group => 0, mode => 0644; - } - - file{'/etc/lighttpd/lighttpd-gitweb.conf': ensure => present, require => Package['lighttpd'], diff --git a/templates/web/lighttpd b/templates/web/lighttpd index c7a5130..50c9c44 100644 --- a/templates/web/lighttpd +++ b/templates/web/lighttpd @@ -1,4 +1,15 @@ -$HTTP["host"] == "<%= $gitweb_url %>" { +$HTTP["host"] == "<%= gitweb_url %>" { + url.redirect += ( + "^$" => "/", + ) + + alias.url += ( + "/gitweb.css" => "/var/www/git/gitweb.css", + "/git-logo.png" => "/var/www/git/git-logo.png", + "/git-favicon.png" => "/var/www/git/git-favicon.png", + "/" => "/var/www/git/gitweb.cgi", + ) + setenv.add-environment = ( "GITWEB_CONFIG" => "/etc/gitweb.d/${name}.conf", ) -- cgit v1.2.3