aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2010-11-08 13:13:13 +0000
committerNicolas Vigier <boklm@mageia.org>2010-11-08 13:13:13 +0000
commit5c04eb70e513b16951560655965638a5dc67f276 (patch)
tree8df0f430a417671cfd04b2c9841e4822f5f51562 /modules
parent26be2cbfc7cf288a95387a4f4ccbb5bad187e83c (diff)
downloadpuppet-5c04eb70e513b16951560655965638a5dc67f276.tar
puppet-5c04eb70e513b16951560655965638a5dc67f276.tar.gz
puppet-5c04eb70e513b16951560655965638a5dc67f276.tar.bz2
puppet-5c04eb70e513b16951560655965638a5dc67f276.tar.xz
puppet-5c04eb70e513b16951560655965638a5dc67f276.zip
add default vhost with redirection to www.mageia.org
Diffstat (limited to 'modules')
-rw-r--r--modules/apache/manifests/init.pp10
-rw-r--r--modules/apache/templates/00_default_vhosts.conf65
2 files changed, 75 insertions, 0 deletions
diff --git a/modules/apache/manifests/init.pp b/modules/apache/manifests/init.pp
index db876955..7ca64922 100644
--- a/modules/apache/manifests/init.pp
+++ b/modules/apache/manifests/init.pp
@@ -22,6 +22,16 @@ class apache {
group => root,
mode => 644,
}
+
+ file { "00_default_vhosts.conf":
+ path => "/etc/httpd/conf/vhosts.d/00_default_vhosts.conf",
+ ensure => "present",
+ owner => root,
+ group => root,
+ mode => 644,
+ notify => Service['apache'],
+ content => template("apache/00_default_vhosts.conf")
+ }
}
class mod_php inherits base {
diff --git a/modules/apache/templates/00_default_vhosts.conf b/modules/apache/templates/00_default_vhosts.conf
new file mode 100644
index 00000000..816e0130
--- /dev/null
+++ b/modules/apache/templates/00_default_vhosts.conf
@@ -0,0 +1,65 @@
+# $Id: 00_default_vhosts.conf 250119 2008-07-26 14:51:31Z oden $
+# $HeadURL: svn+ssh://svn.mandriva.com/svn/packages/cooker/apache-conf/current/SOURCES/00_default_vhosts.conf $
+# This is an example VirtualHosts configuration.
+#
+# Since Apache 1.3.19, we modified the setup to include some nice tricks:
+#
+# - We added the User and Group directives so VirtualHosts now work with
+# suexec directive. If set, Apache will run all cgi scripts under that
+# user and group (provided the uid and gid are > 100 for security). The
+# directories and cgi files *must* belong to that user/group for the
+# feature to work
+#
+# - We added the Setenv VLOG directive. This works in conjunction with
+# the CustomLog in common.conf. When Setenv VLOG is set, apache will
+# create a /var/log/httpd/VLOG-YYYY-MM-<ServerName>.log instead of logging
+# to access_log. Use this instead of defining a special logfile for
+# each vhost, otherwise you eat up file descriptors.
+#
+# - You can also specify a path for the VLOG for each Vhost, for example,
+# to place the logs in each user's directory. However, if you want to
+# use the file for accounting, place it in a directory owned by root,
+# otherwise the user will be able to erase it.
+#
+# - I suggest only including the ErrorLog *only* if the vhost will use
+# cgi scripts. Again, it saves file descriptors!
+
+
+################# IP-based Virtual Hosts
+# <VirtualHost 192.168.2.100>
+# User jmdault
+# Group jmdault
+# DocumentRoot /home/jmdault/public_html
+# ServerName test2.com
+# Setenv VLOG /home/jmdault/logs
+# ErrorLogs /home/jmdault/test2-error_log
+# </VirtualHost>
+
+################# Named VirtualHosts
+# NameVirtualHost 111.222.33.44
+# <VirtualHost 111.222.33.44>
+# ServerName www.domain.tld
+# ServerPath /domain
+# DocumentRoot /web/domain
+# </VirtualHost>
+
+#<VirtualHost alice.com>
+# ServerName alice.com
+# # normal vhost configs
+# <IfModule peruser.c>
+# # this must match a Processor line
+# ServerEnvironment alice users /home/alice
+#
+# # these are optional - defaults to the values specified above
+# MinSpareProcessors 4
+# MaxProcessors 20
+# </IfModule>
+#</VirtualHost>
+
+<VirtualHost *:80>
+ DocumentRoot /var/www/html
+ <Location />
+ Allow from all
+ </Location>
+ Redirect / http://www.mageia.org/
+</VirtualHost>