Added variables for user and group to apache configs, commented out UserDir.

This commit is contained in:
Ossi Salmi 2009-12-01 16:25:31 +02:00 committed by Timo Mkinen
parent 95d3d822d6
commit 9c853fa445
3 changed files with 40 additions and 8 deletions

View file

@ -38,8 +38,22 @@ class apache::common {
# Configure HTTP server. # Configure HTTP server.
# #
# === Global variables
#
# $httpd_user:
# User httpd runs as. Defaults to apache.
# $httpd_group:
# Group httpd runs as. Defaults to apache.
#
class apache::server inherits apache::common { class apache::server inherits apache::common {
if ! $httpd_user {
$httpd_user = "apache"
}
if ! $httpd_group {
$httpd_group = "apache"
}
file { [ "/etc/httpd/conf.http.d", file { [ "/etc/httpd/conf.http.d",
"/etc/httpd/site.http.d", "/etc/httpd/site.http.d",
"/srv/www/http", "/srv/www/http",
@ -147,8 +161,22 @@ define apache::site($root="", $config="") {
# Configure HTTPS server. # Configure HTTPS server.
# #
# === Global variables
#
# $httpsd_user:
# User httpsd runs as. Defaults to httpsd.
# $httpsd_group:
# Group httpsd runs as. Defaults to httpsd.
#
class apache::sslserver inherits apache::common { class apache::sslserver inherits apache::common {
if ! $httpsd_user {
$httpsd_user = "httpsd"
}
if ! $httpsd_group {
$httpsd_group = "httpsd"
}
package { "mod_ssl": package { "mod_ssl":
ensure => installed ensure => installed
} }

View file

@ -230,8 +230,8 @@ Include conf.http.d/*.conf
# when the value of (unsigned)Group is above 60000; # when the value of (unsigned)Group is above 60000;
# don't use Group #-1 on these systems! # don't use Group #-1 on these systems!
# #
User apache User <%= httpd_user %>
Group apache Group <%= httpd_group %>
### Section 2: 'Main' server configuration ### Section 2: 'Main' server configuration
# #
@ -306,7 +306,7 @@ DocumentRoot "/srv/www/http/<%= fqdn %>"
# #
# This should be changed to whatever you set DocumentRoot to. # This should be changed to whatever you set DocumentRoot to.
# #
<Directory "/srv/www/http/*"> <Directory "/srv/www/http">
# #
# Possible values for the Options directive are "None", "All", # Possible values for the Options directive are "None", "All",
@ -355,7 +355,9 @@ DocumentRoot "/srv/www/http/<%= fqdn %>"
# of a username on the system (depending on home directory # of a username on the system (depending on home directory
# permissions). # permissions).
# #
UserDir disable # puppet note: commented to make it possible to configure UserDir via
# included config. UserDir is disabled by default since apache 2.1.14.
#UserDir disable
# #
# To enable requests to /~user/ to serve the user's public_html # To enable requests to /~user/ to serve the user's public_html

View file

@ -230,8 +230,8 @@ Include conf.https.d/*.conf
# when the value of (unsigned)Group is above 60000; # when the value of (unsigned)Group is above 60000;
# don't use Group #-1 on these systems! # don't use Group #-1 on these systems!
# #
User httpsd User <%= httpsd_user %>
Group httpsd Group <%= httpsd_group %>
### Section 2: 'Main' server configuration ### Section 2: 'Main' server configuration
# #
@ -306,7 +306,7 @@ DocumentRoot "/srv/www/https/<%= fqdn %>"
# #
# This should be changed to whatever you set DocumentRoot to. # This should be changed to whatever you set DocumentRoot to.
# #
<Directory "/srv/www/https/*"> <Directory "/srv/www/https">
# #
# Possible values for the Options directive are "None", "All", # Possible values for the Options directive are "None", "All",
@ -355,7 +355,9 @@ DocumentRoot "/srv/www/https/<%= fqdn %>"
# of a username on the system (depending on home directory # of a username on the system (depending on home directory
# permissions). # permissions).
# #
UserDir disable # puppet note: commented to make it possible to configure UserDir via
# included config. UserDir is disabled by default since apache 2.1.14.
#UserDir disable
# #
# To enable requests to /~user/ to serve the user's public_html # To enable requests to /~user/ to serve the user's public_html