summaryrefslogtreecommitdiff
path: root/templates/macros.erb
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2009-11-03 17:50:41 -0200
committerSilvio Rhatto <rhatto@riseup.net>2009-11-03 17:50:41 -0200
commit92ab02215470aaf4100e582b0d628734156d7a65 (patch)
treef306bb3161d8519f46cdddd47c8fbe52c1dd5b1a /templates/macros.erb
parente62b2bd262f984e02e4ac5f801dbd80d81fc5b5e (diff)
downloadpuppet-apache-92ab02215470aaf4100e582b0d628734156d7a65.tar.gz
puppet-apache-92ab02215470aaf4100e582b0d628734156d7a65.tar.bz2
Adding website definition
Diffstat (limited to 'templates/macros.erb')
-rw-r--r--templates/macros.erb87
1 files changed, 87 insertions, 0 deletions
diff --git a/templates/macros.erb b/templates/macros.erb
new file mode 100644
index 0000000..1a9d05c
--- /dev/null
+++ b/templates/macros.erb
@@ -0,0 +1,87 @@
+<Macro Subversion $repos>
+ # begin svn config
+ <Location /$repos>
+ DAV svn
+ SVNPath /var/svn/$repos
+
+ AuthType Basic
+ AuthName "Subversion $repos"
+ AuthUserFile /var/svn/$repos/conf/htpasswd
+
+ # For any operations other than these, require an authenticated user.
+ <LimitExcept GET PROPFIND OPTIONS REPORT>
+ Require valid-user
+ </LimitExcept>
+ </Location>
+ # end svn config
+</Macro>
+
+<Macro Drupal $version>
+ # begin drupal config
+ <Directory <%= apache_www_folder %>/drupal-$version>
+ Options Indexes Includes FollowSymLinks MultiViews
+ AllowOverride All
+ </Directory>
+ # end drupal config
+</Macro>
+
+<Macro Wiki $site>
+ # begin wiki config
+ <Directory <%= apache_sites_folder %>/$site/wiki>
+ Options Indexes Includes FollowSymLinks MultiViews
+ AllowOverride All
+ </Directory>
+ # end wiki config
+</Macro>
+
+<Macro Site $name>
+ # begin site config
+ <Directory <%= apache_sites_folder %>/$name/site>
+ Options Indexes Includes FollowSymLinks MultiViews
+ AllowOverride All
+ </Directory>
+ # end site config
+</Macro>
+
+<Macro Trac $site>
+ # begin trac config
+ <Location "/trac">
+ SetHandler mod_python
+ PythonInterpreter main_interpreter
+ PythonHandler trac.web.modpython_frontend
+ PythonOption TracEnv <%= apache_sites_folder %>/$site/trac
+ PythonOption TracUriRoot /trac
+
+ # This prevents strange behavior when using trac
+ # in the same virtual host with software that
+ # has rewrite rules in .htaccess, such as drupal
+ RewriteEngine off
+ </Location>
+
+ <Location "/trac/login">
+ AuthType Basic
+ AuthName "Trac $site"
+ AuthUserFile <%= apache_sites_folder %>/$site/trac/auth/.htpasswd
+ Require valid-user
+ </Location>
+ # end trac config
+</Macro>
+
+<Macro Moin $site>
+ # begin moin config
+ Alias /moinroot /usr/share/moin/htdocs/
+ # TODO: fastcgi
+ ScriptAlias /moin "<%= apache_sites_folder %>/$site/moin/cgi-bin/moin.cgi"
+ # end moin config
+ ScriptAlias /moin "<%= apache_sites_folder %>/$site/moin/cgi-bin/moin.cgi"
+ # end moin config
+</Macro>
+
+<Macro Ikiwiki $name>
+ # begin ikiwiki config
+ <Directory <%= apache_sites_folder %>/$name/ikiwiki>
+ Options Indexes Includes FollowSymLinks MultiViews ExecCGI
+ AllowOverride All
+ </Directory>
+ # end ikiwiki config
+</Macro>