From 529cd5077e3d76c1d5b612bc146ab174d7143c30 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 18 Sep 2014 12:47:46 -0300 Subject: Squashed 'puppet/' content from commit bb2eae6 git-subtree-dir: puppet git-subtree-split: bb2eae6f3a1f44fef0a05000d79c298442fa24c7 --- templates/apache/vhosts/git.erb | 20 +++++++++++ templates/apache/vhosts/lists.erb | 22 ++++++++++++ templates/apache/vhosts/mail.erb | 72 ++++++++++++++++++++++++++++++++++++++ templates/apache/vhosts/nagios.erb | 61 ++++++++++++++++++++++++++++++++ templates/apache/vhosts/wiki.erb | 17 +++++++++ 5 files changed, 192 insertions(+) create mode 100644 templates/apache/vhosts/git.erb create mode 100644 templates/apache/vhosts/lists.erb create mode 100644 templates/apache/vhosts/mail.erb create mode 100644 templates/apache/vhosts/nagios.erb create mode 100644 templates/apache/vhosts/wiki.erb (limited to 'templates/apache/vhosts') diff --git a/templates/apache/vhosts/git.erb b/templates/apache/vhosts/git.erb new file mode 100644 index 0000000..25aecd1 --- /dev/null +++ b/templates/apache/vhosts/git.erb @@ -0,0 +1,20 @@ +# begin vhost for git + + # 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] + +# end vhost for git diff --git a/templates/apache/vhosts/lists.erb b/templates/apache/vhosts/lists.erb new file mode 100644 index 0000000..158dfd4 --- /dev/null +++ b/templates/apache/vhosts/lists.erb @@ -0,0 +1,22 @@ +# begin vhost for lists.<%= domain %> + + 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 + + + IPCCommTimeout 120 + MaxProcessCount 2 + + + SuexecUserGroup sympa sympa + + + SetHandler fcgid-script + + +# end vhost for lists.<%= domain %> diff --git a/templates/apache/vhosts/mail.erb b/templates/apache/vhosts/mail.erb new file mode 100644 index 0000000..3badcf0 --- /dev/null +++ b/templates/apache/vhosts/mail.erb @@ -0,0 +1,72 @@ +# begin vhost for mail.<%= domain > + + ServerName mail.<%= domain > + #DocumentRoot /usr/share/squirrelmail + DocumentRoot /var/lib/roundcube + + # begin squirrel config + + Options Indexes FollowSymLinks + + php_flag register_globals off + + + php_flag register_globals off + + + DirectoryIndex index.php + + + # access to configtest is limited by default to prevent information leak + + order deny,allow + deny from all + allow from 127.0.0.1 + + + # 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 + + + Options Indexes MultiViews FollowSymLinks + AllowOverride None + Order allow,deny + allow from all + + + + 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 + + + # Protecting basic directories: + + Options -FollowSymLinks + AllowOverride None + + + + Options -FollowSymLinks + AllowOverride None + Order allow,deny + Deny from all + + + + Options -FollowSymLinks + AllowOverride None + Order allow,deny + Deny from all + + # end roundcube config + + +# end vhost for mail.<%= domain > diff --git a/templates/apache/vhosts/nagios.erb b/templates/apache/vhosts/nagios.erb new file mode 100644 index 0000000..8b3d252 --- /dev/null +++ b/templates/apache/vhosts/nagios.erb @@ -0,0 +1,61 @@ +# begin vhost for nagios + + 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 + + + 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 + + + # 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 + +# end vhost for nagios diff --git a/templates/apache/vhosts/wiki.erb b/templates/apache/vhosts/wiki.erb new file mode 100644 index 0000000..56e395b --- /dev/null +++ b/templates/apache/vhosts/wiki.erb @@ -0,0 +1,17 @@ +# begin vhost for wiki.<%= domain > + + ServerName wiki.<%= domain > + DocumentRoot /var/www/data/wiki + + # begin wiki config + + Options Indexes Includes FollowSymLinks MultiViews + AllowOverride All + + # end wiki config + + + AssignUserId wiki wiki + + +# end vhost for wiki.<%= domain > -- cgit v1.2.3