aboutsummaryrefslogtreecommitdiff
path: root/puppet/templates/apache
diff options
context:
space:
mode:
Diffstat (limited to 'puppet/templates/apache')
-rw-r--r--puppet/templates/apache/htdocs/images/README.html.erb3
-rw-r--r--puppet/templates/apache/htdocs/index.html.erb9
-rw-r--r--puppet/templates/apache/htdocs/missing.html.erb12
-rw-r--r--puppet/templates/apache/vhosts/git.erb20
-rw-r--r--puppet/templates/apache/vhosts/lists.erb22
-rw-r--r--puppet/templates/apache/vhosts/mail.erb72
-rw-r--r--puppet/templates/apache/vhosts/nagios.erb61
-rw-r--r--puppet/templates/apache/vhosts/wiki.erb17
8 files changed, 216 insertions, 0 deletions
diff --git a/puppet/templates/apache/htdocs/images/README.html.erb b/puppet/templates/apache/htdocs/images/README.html.erb
new file mode 100644
index 0000000..4d0f929
--- /dev/null
+++ b/puppet/templates/apache/htdocs/images/README.html.erb
@@ -0,0 +1,3 @@
+<pre>
+When not explicitly mentioned, the use of these images is restricted to <%= base_domain %>
+</pre>
diff --git a/puppet/templates/apache/htdocs/index.html.erb b/puppet/templates/apache/htdocs/index.html.erb
new file mode 100644
index 0000000..6d2d7ea
--- /dev/null
+++ b/puppet/templates/apache/htdocs/index.html.erb
@@ -0,0 +1,9 @@
+<html><head>
+<meta http-equiv="refresh" content="1;url=http://<%= domain %>">
+<title><%= domain %></title></head><body>
+
+<center>
+ <p><code>You are being redirected to <a href="http://<%= domain %>">http://<%= domain %></a>.</code></p>
+</center>
+
+</body></html>
diff --git a/puppet/templates/apache/htdocs/missing.html.erb b/puppet/templates/apache/htdocs/missing.html.erb
new file mode 100644
index 0000000..0c95ef3
--- /dev/null
+++ b/puppet/templates/apache/htdocs/missing.html.erb
@@ -0,0 +1,12 @@
+<html>
+<head>
+<title>404 - Not Found</title>
+</head>
+<body>
+ <center>
+ <pre>
+ The address you are trying to reach could not be found. :(
+ </pre>
+ </center>
+</body>
+</html>
diff --git a/puppet/templates/apache/vhosts/git.erb b/puppet/templates/apache/vhosts/git.erb
new file mode 100644
index 0000000..25aecd1
--- /dev/null
+++ b/puppet/templates/apache/vhosts/git.erb
@@ -0,0 +1,20 @@
+# begin vhost for git
+<VirtualHost *:80>
+ # Recipe based on http://josephspiros.com/2009/07/26/configuring-gitweb-for-apache-on-debian
+
+ ServerName git.<%= domain %>
+ SetEnv GITWEB_CONFIG /etc/gitweb.conf
+ HeaderName HEADER
+ DocumentRoot /var/git/repositories
+ Alias /gitweb.css /usr/share/gitweb/gitweb.css
+ Alias /git-favicon.png /usr/share/gitweb/git-favicon.png
+ Alias /git-logo.png /usr/share/gitweb/git-logo.png
+
+ ScriptAlias /gitweb /usr/lib/cgi-bin/gitweb.cgi
+ RewriteEngine on
+
+ # Rewrite all other paths that aren't git repo internals to gitweb
+ RewriteRule ^/$ /gitweb [PT]
+ RewriteRule ^/(.*\.git/(?!/?(HEAD|info|objects|refs)).*)?$ /gitweb%{REQUEST_URI} [L,PT]
+</VirtualHost>
+# end vhost for git
diff --git a/puppet/templates/apache/vhosts/lists.erb b/puppet/templates/apache/vhosts/lists.erb
new file mode 100644
index 0000000..158dfd4
--- /dev/null
+++ b/puppet/templates/apache/vhosts/lists.erb
@@ -0,0 +1,22 @@
+# begin vhost for lists.<%= domain %>
+<VirtualHost *:80>
+ ServerName lists.<%= domain %>
+ DocumentRoot /var/www/data/lists
+
+ RedirectMatch ^/$ https://lists.<%= domain %>/wws
+ Alias /static-sympa /var/lib/sympa/static_content
+ Alias /wwsicons /usr/share/sympa/icons
+ ScriptAlias /wws /var/www/data/lists/wwsympa.fcgi
+
+ <IfModule mod_fcgid.c>
+ IPCCommTimeout 120
+ MaxProcessCount 2
+ </IfModule>
+
+ SuexecUserGroup sympa sympa
+
+ <Location /wws>
+ SetHandler fcgid-script
+ </Location>
+</VirtualHost>
+# end vhost for lists.<%= domain %>
diff --git a/puppet/templates/apache/vhosts/mail.erb b/puppet/templates/apache/vhosts/mail.erb
new file mode 100644
index 0000000..3badcf0
--- /dev/null
+++ b/puppet/templates/apache/vhosts/mail.erb
@@ -0,0 +1,72 @@
+# begin vhost for mail.<%= domain >
+<VirtualHost *:80>
+ ServerName mail.<%= domain >
+ #DocumentRoot /usr/share/squirrelmail
+ DocumentRoot /var/lib/roundcube
+
+ # begin squirrel config
+ <Directory /usr/share/squirrelmail>
+ Options Indexes FollowSymLinks
+ <IfModule mod_php4.c>
+ php_flag register_globals off
+ </IfModule>
+ <IfModule mod_php5.c>
+ php_flag register_globals off
+ </IfModule>
+ <IfModule mod_dir.c>
+ DirectoryIndex index.php
+ </IfModule>
+
+ # access to configtest is limited by default to prevent information leak
+ <Files configtest.php>
+ order deny,allow
+ deny from all
+ allow from 127.0.0.1
+ </Files>
+ </Directory>
+ # end squirrel config
+
+ # begin roundcube config
+ # Access to tinymce files
+ Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/
+ Alias /roundcube /var/lib/roundcube
+
+ <Directory "/usr/share/tinymce/www/">
+ Options Indexes MultiViews FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ allow from all
+ </Directory>
+
+ <Directory /var/lib/roundcube/>
+ Options +FollowSymLinks
+ # This is needed to parse /var/lib/roundcube/.htaccess. See its
+ # content before setting AllowOverride to None.
+ AllowOverride All
+ order allow,deny
+ allow from all
+ </Directory>
+
+ # Protecting basic directories:
+ <Directory /var/lib/roundcube/config>
+ Options -FollowSymLinks
+ AllowOverride None
+ </Directory>
+
+ <Directory /var/lib/roundcube/temp>
+ Options -FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ Deny from all
+ </Directory>
+
+ <Directory /var/lib/roundcube/logs>
+ Options -FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ Deny from all
+ </Directory>
+ # end roundcube config
+
+</VirtualHost>
+# end vhost for mail.<%= domain >
diff --git a/puppet/templates/apache/vhosts/nagios.erb b/puppet/templates/apache/vhosts/nagios.erb
new file mode 100644
index 0000000..8b3d252
--- /dev/null
+++ b/puppet/templates/apache/vhosts/nagios.erb
@@ -0,0 +1,61 @@
+# begin vhost for nagios
+<VirtualHost *:80>
+ ServerName nagios.<%= domain >
+ DocumentRoot /usr/share/nagios3/htdocs
+
+ # apache configuration for nagios 3.x
+ # note to users of nagios 1.x and 2.x:
+ # throughout this file are commented out sections which preserve
+ # backwards compatibility with bookmarks/config forî<80><80>older nagios versios.
+ # simply look for lines following "nagios 1.x:" and "nagios 2.x" comments.
+
+ ScriptAlias /cgi-bin/nagios3 /usr/lib/cgi-bin/nagios3
+ ScriptAlias /nagios3/cgi-bin /usr/lib/cgi-bin/nagios3
+ # nagios 1.x:
+ #ScriptAlias /cgi-bin/nagios /usr/lib/cgi-bin/nagios3
+ #ScriptAlias /nagios/cgi-bin /usr/lib/cgi-bin/nagios3
+ # nagios 2.x:
+ #ScriptAlias /cgi-bin/nagios2 /usr/lib/cgi-bin/nagios3
+ #ScriptAlias /nagios2/cgi-bin /usr/lib/cgi-bin/nagios3
+
+ # Where the stylesheets (config files) reside
+ Alias /nagios3/stylesheets /etc/nagios3/stylesheets
+ # nagios 1.x:
+ #Alias /nagios/stylesheets /etc/nagios3/stylesheets
+ # nagios 2.x:
+ #Alias /nagios2/stylesheets /etc/nagios3/stylesheets
+
+ # Where the HTML pages live
+ Alias /nagios3 /usr/share/nagios3/htdocs
+ # nagios 2.x:
+ #Alias /nagios2 /usr/share/nagios3/htdocs
+ # nagios 1.x:
+ #Alias /nagios /usr/share/nagios3/htdocs
+
+ <DirectoryMatch (/usr/share/nagios3/htdocs|/usr/lib/cgi-bin/nagios3)>
+ Options FollowSymLinks
+
+ DirectoryIndex index.html
+
+ AllowOverride AuthConfig
+ Order Allow,Deny
+ Allow From All
+
+ AuthName "Nagios Access"
+ AuthType Basic
+ AuthUserFile /etc/nagios3/htpasswd.users
+ # nagios 1.x:
+ #AuthUserFile /etc/nagios/htpasswd.users
+ require valid-user
+ </DirectoryMatch>
+
+ # Enable this ScriptAlias if you want to enable the grouplist patch.
+ # See http://apan.sourceforge.net/download.html for more info
+ # It allows you to see a clickable list of all hostgroups in the
+ # left pane of the Nagios web interface
+ # XXX This is not tested for nagios 2.x use at your own peril
+ #ScriptAlias /nagios3/side.html /usr/lib/cgi-bin/nagios3/grouplist.cgi
+ # nagios 1.x:
+ #ScriptAlias /nagios/side.html /usr/lib/cgi-bin/nagios3/grouplist.cgi
+</VirtualHost>
+# end vhost for nagios
diff --git a/puppet/templates/apache/vhosts/wiki.erb b/puppet/templates/apache/vhosts/wiki.erb
new file mode 100644
index 0000000..56e395b
--- /dev/null
+++ b/puppet/templates/apache/vhosts/wiki.erb
@@ -0,0 +1,17 @@
+# begin vhost for wiki.<%= domain >
+<VirtualHost *:80>
+ ServerName wiki.<%= domain >
+ DocumentRoot /var/www/data/wiki
+
+ # begin wiki config
+ <Directory /var/www/data/wiki>
+ Options Indexes Includes FollowSymLinks MultiViews
+ AllowOverride All
+ </Directory>
+ # end wiki config
+
+ <IfModule mpm_itk_module>
+ AssignUserId wiki wiki
+ </IfModule>
+</VirtualHost>
+# end vhost for wiki.<%= domain >