Browse Source

Merge "Add Apache 2.4 syntax to status.o.o vhost"

changes/48/321248/1
Jenkins 3 years ago
parent
commit
586a99f718

+ 8
- 0
modules/openstack_project/manifests/status.pp View File

@@ -26,6 +26,14 @@ class openstack_project::status (
26 26
 
27 27
   include ::httpd
28 28
 
29
+  # The Apache mod_version module only needs to be enabled on Ubuntu 12.04
30
+  # as it comes compiled and enabled by default on newer OS, including CentOS
31
+  if !defined(Httpd::Mod['version']) and $::operatingsystem == 'Ubuntu' and $::operatingsystemrelease == '12.04' {
32
+    httpd::mod { 'version':
33
+      ensure => present
34
+    }
35
+  }
36
+
29 37
   if ! defined(Httpd::Mod['rewrite']) {
30 38
     httpd::mod { 'rewrite':
31 39
         ensure => present,

+ 18
- 0
modules/openstack_project/templates/status.vhost.erb View File

@@ -17,6 +17,9 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %>
17 17
       AllowOverride None
18 18
       Order allow,deny
19 19
       allow from all
20
+      <IfVersion >= 2.4>
21
+        Require all granted
22
+      </IfVersion>
20 23
   </Directory>
21 24
 
22 25
   Alias /reviews /srv/static/reviewday
@@ -24,6 +27,9 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %>
24 27
       AllowOverride None
25 28
       Order allow,deny
26 29
       allow from all
30
+      <IfVersion >= 2.4>
31
+        Require all granted
32
+      </IfVersion>
27 33
   </Directory>
28 34
 
29 35
   Alias /openstack-health /srv/static/openstack-health
@@ -31,6 +37,9 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %>
31 37
     AllowOverride None
32 38
     Order allow,deny
33 39
     allow from all
40
+    <IfVersion >= 2.4>
41
+      Require all granted
42
+    </IfVersion>
34 43
   </Directory>
35 44
 
36 45
   <Directory <%= @docroot %>>
@@ -38,6 +47,9 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %>
38 47
     AllowOverride None
39 48
     Order allow,deny
40 49
     allow from all
50
+    <IfVersion >= 2.4>
51
+      Require all granted
52
+    </IfVersion>
41 53
   </Directory>
42 54
 
43 55
   # Sample elastic-recheck config file, adjust prefixes
@@ -48,6 +60,9 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %>
48 60
       AllowOverride None
49 61
       Order allow,deny
50 62
       allow from all
63
+      <IfVersion >= 2.4>
64
+        Require all granted
65
+      </IfVersion>
51 66
   </Directory>
52 67
 
53 68
   RedirectMatch permanent ^/rechecks(.*) /elastic-recheck
@@ -56,6 +71,9 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %>
56 71
       AllowOverride None
57 72
       Order allow,deny
58 73
       allow from all
74
+      <IfVersion >= 2.4>
75
+        Require all granted
76
+      </IfVersion>
59 77
   </Directory>
60 78
 
61 79
 

Loading…
Cancel
Save