Browse Source

Update Configuration for Precise

added conditional logic to support fastcgi apache 2.2 mod on Precise

Change-Id: Ice7a2f9d802fe4fa65589456eb376bafe85ba448
Sebastian Marcet 3 years ago
parent
commit
6cb41de782
2 changed files with 25 additions and 5 deletions
  1. 8
    1
      manifests/init.pp
  2. 17
    4
      templates/vhost.erb

+ 8
- 1
manifests/init.pp View File

@@ -241,7 +241,14 @@ class openstackid (
241 241
   class { '::apache::mod::ssl': }
242 242
   class { '::apache::mod::rewrite': }
243 243
   class { '::apache::mod::proxy': }
244
-  ::apache::mod { 'proxy_fcgi': }
244
+
245
+  if ($::lsbdistcodename == 'precise') {
246
+    class { '::apache::mod::fastcgi': }
247
+    class { '::apache::mod::actions': }
248
+  }
249
+  else {
250
+    ::apache::mod { 'proxy_fcgi': }
251
+  }
245 252
 
246 253
   if $ssl_cert_file_contents != '' {
247 254
     file { $ssl_cert_file:

+ 17
- 4
templates/vhost.erb View File

@@ -42,9 +42,22 @@
42 42
     Allow from all
43 43
   </Directory>
44 44
 
45
-  <FilesMatch \.php$>
46
-    SetHandler "proxy:fcgi://127.0.0.1:9000"
47
-  </FilesMatch>
48
-
45
+  <IfModule mod_proxy_fcgi.c>
46
+      <FilesMatch \.php$>
47
+        SetHandler "proxy:fcgi://127.0.0.1:9000"
48
+      </FilesMatch>
49
+  </IfModule>
50
+
51
+  <IfModule mod_fastcgi.c>
52
+        AddHandler php5-fcgi .php
53
+        Action php5-fcgi /php5-fcgi
54
+        Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
55
+        FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization
56
+        <Directory /usr/lib/cgi-bin>
57
+            Options ExecCGI FollowSymLinks
58
+            SetHandler fastcgi-script
59
+            Require all granted
60
+        </Directory>
61
+  </IfModule>
49 62
 </VirtualHost>
50 63
 </IfModule>

Loading…
Cancel
Save