Added variables for user and group to apache configs, commented out UserDir.
This commit is contained in:
parent
95d3d822d6
commit
9c853fa445
3 changed files with 40 additions and 8 deletions
|
@ -38,8 +38,22 @@ class apache::common {
|
|||
|
||||
# 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 {
|
||||
|
||||
if ! $httpd_user {
|
||||
$httpd_user = "apache"
|
||||
}
|
||||
if ! $httpd_group {
|
||||
$httpd_group = "apache"
|
||||
}
|
||||
|
||||
file { [ "/etc/httpd/conf.http.d",
|
||||
"/etc/httpd/site.http.d",
|
||||
"/srv/www/http",
|
||||
|
@ -147,8 +161,22 @@ define apache::site($root="", $config="") {
|
|||
|
||||
# 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 {
|
||||
|
||||
if ! $httpsd_user {
|
||||
$httpsd_user = "httpsd"
|
||||
}
|
||||
if ! $httpsd_group {
|
||||
$httpsd_group = "httpsd"
|
||||
}
|
||||
|
||||
package { "mod_ssl":
|
||||
ensure => installed
|
||||
}
|
||||
|
|
|
@ -230,8 +230,8 @@ Include conf.http.d/*.conf
|
|||
# when the value of (unsigned)Group is above 60000;
|
||||
# don't use Group #-1 on these systems!
|
||||
#
|
||||
User apache
|
||||
Group apache
|
||||
User <%= httpd_user %>
|
||||
Group <%= httpd_group %>
|
||||
|
||||
### Section 2: 'Main' server configuration
|
||||
#
|
||||
|
@ -306,7 +306,7 @@ DocumentRoot "/srv/www/http/<%= fqdn %>"
|
|||
#
|
||||
# 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",
|
||||
|
@ -355,7 +355,9 @@ DocumentRoot "/srv/www/http/<%= fqdn %>"
|
|||
# of a username on the system (depending on home directory
|
||||
# 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
|
||||
|
|
|
@ -230,8 +230,8 @@ Include conf.https.d/*.conf
|
|||
# when the value of (unsigned)Group is above 60000;
|
||||
# don't use Group #-1 on these systems!
|
||||
#
|
||||
User httpsd
|
||||
Group httpsd
|
||||
User <%= httpsd_user %>
|
||||
Group <%= httpsd_group %>
|
||||
|
||||
### Section 2: 'Main' server configuration
|
||||
#
|
||||
|
@ -306,7 +306,7 @@ DocumentRoot "/srv/www/https/<%= fqdn %>"
|
|||
#
|
||||
# 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",
|
||||
|
@ -355,7 +355,9 @@ DocumentRoot "/srv/www/https/<%= fqdn %>"
|
|||
# of a username on the system (depending on home directory
|
||||
# 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
|
||||
|
|
Loading…
Add table
Reference in a new issue