]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Add extra conf for Apache 2.4
authorDan Mick <dan.mick@inktank.com>
Sat, 16 Aug 2014 04:02:15 +0000 (21:02 -0700)
committerDan Mick <dan.mick@inktank.com>
Sat, 16 Aug 2014 05:37:22 +0000 (22:37 -0700)
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 <dan.mick@inktank.com>
tasks/apache.conf.template
tasks/rgw.py

index c6fc6620e85ce7d8ac446fc595163eef526f5129..5518e6bce3dcbc8e161bdece8948def0a4e06965 100644 (file)
 Listen {port}
 ServerName {host}
 
+<IfVersion >= 2.4>
+  User {user}
+  Group {group}
+  {apache24_modconfig}
+</IfVersion>
+
 ServerRoot {testdir}/apache
 ErrorLog {testdir}/archive/apache.{client}/error.log
 LogFormat "%h l %u %t \"%r\" %>s %b \"{{Referer}}i\" \"%{{User-agent}}i\"" combined
index ca82359bbabc5fd93409aa6c74e7c0259fbbc282..a233b999a5478b2792594d2729c7ab6add07b936 100644 (file)
@@ -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,