From 9de5bd1d2302907c59594eb4df8b4d954d5e8e94 Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Fri, 15 Aug 2014 21:02:15 -0700 Subject: [PATCH] Add extra conf for Apache 2.4 Inside a conditional to affect only 2.4, set User, Group, and the module config to load mpm_event. This is normally done with the default configuration files, but since this abbreviated conf bypasses those, we must set them here. Signed-off-by: Dan Mick --- tasks/apache.conf.template | 6 ++++++ tasks/rgw.py | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/tasks/apache.conf.template b/tasks/apache.conf.template index c6fc6620e85ce..5518e6bce3dcb 100644 --- a/tasks/apache.conf.template +++ b/tasks/apache.conf.template @@ -14,6 +14,12 @@ Listen {port} ServerName {host} += 2.4> + User {user} + Group {group} + {apache24_modconfig} + + ServerRoot {testdir}/apache ErrorLog {testdir}/archive/apache.{client}/error.log LogFormat "%h l %u %t \"%r\" %>s %b \"{{Referer}}i\" \"%{{User-agent}}i\"" combined diff --git a/tasks/rgw.py b/tasks/rgw.py index ca82359bbabc5..a233b999a5478 100644 --- a/tasks/rgw.py +++ b/tasks/rgw.py @@ -90,9 +90,18 @@ def ship_apache_configs(ctx, config, role_endpoints): if system_type == 'deb': mod_path = '/usr/lib/apache2/modules' print_continue = 'on' + user = 'www-data' + group = 'www-data' + apache24_modconfig = ''' + IncludeOptional /etc/apache2/mods-enabled/mpm_event.conf + IncludeOptional /etc/apache2/mods-enabled/mpm_event.load''' else: mod_path = '/usr/lib64/httpd/modules' print_continue = 'off' + user = 'apache' + group = 'apache' + apache24_modconfig = \ + 'IncludeOptional /etc/httpd/conf.modules.d/00-mpm.conf' host, port = role_endpoints[client] with file(src, 'rb') as f: conf = f.read().format( @@ -103,6 +112,9 @@ def ship_apache_configs(ctx, config, role_endpoints): port=port, client=client, idle_timeout=idle_timeout, + user=user, + group=group, + apache24_modconfig=apache24_modconfig, ) teuthology.write_file( remote=remote, -- 2.39.5