summaryrefslogtreecommitdiff
path: root/README
blob: 06198506b89be5a38b30e0720f3cf96c32320e9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
puppet module for managing an Apache web server
===============================================

This module tries to manage apache on different distros in a similar manner. a
few additional directories have to be created as well some configuration files
have to be deployed to fit this schema.

! Upgrade Notice !

 currently deployed apache::config::file resources could be broken
 so one should change occurences of this resource's argument from:

      source => "modules/site-apache/blah"

 to a full source specification string:

      source => "puppet:///modules/site-apache/blah"


written by immerda project group
admin+puppet(at)immerda.ch

adapted by Puzzle ITC 
haerry+puppet(at)puzzle.ch

original idea by David Schmitt
<david(at)schmitt.edv-bus.at>

License: GPLv3

Usage
=====

Installing Apache
-----------------

To install Apache, simply include the 'apache' class in your manifests:

    include apache

If you want to install Apache and also enable SSL support:

    include apache::ssl

You can install the ITK worker model to enforce stronger, per-user security:

    include apache::itk

You can combine SSL support and the ITK worker model by including both classes.

If you do not want the 0-default.conf and 0-default_ssl.conf virtualhosts
automatically created, then simply set $apache_no_default_site = true in your
node configuration.

Configuring Apache
------------------

To deploy a global configuration file in the conf.d directory under Apache's
config directory, you can use the following:

apache::config::global { 'filename':
  content => 'Alias /thisApplication /usr/share/thisApplication/htdocs',
}

To manage users in an htpasswd file:

apache::htpasswd_user { "joe@$domain":
  site => "$domain",
  username => 'joe',
  password => "$pass",
  password_iscrypted = true,
}

VirtualHost files
-----------------

vhosts can be added with the vhosts define:
(currently only plain vhosts file are supported)

apache::vhosts::file { "$domain" }

multiple shortcuts can be used to define a vhost with certain capabilities:

apache::vhosts::php::drupal { "$domain" }

Munin
-----

If you are using munin, and have the puppet munin module installed, you can set
the variable $use_munin = true to have graphs setup for you.

For now, though, this only enables the server-status page in apache.

Shorewall
---------

If you have the shorewall module installed and are using it, you can set the
variable $use_shorewall = true to have a rule automatically defined for you to
let traffic come from the exterior into the web server via port 80, and also
443 if you're using the apache::ssl class.