apache: only generate suphp directives when it will be used release_20180707-1
authorClinton Ebadi <clinton@unknownlamer.org>
Sun, 8 Jul 2018 00:22:39 +0000 (20:22 -0400)
committerClinton Ebadi <clinton@unknownlamer.org>
Sun, 8 Jul 2018 00:22:39 +0000 (20:22 -0400)
suPHP directives should not be added when using fast_php, breaks when
using apache 2.4 with no suphp extension present.

src/plugins/apache.sml

index 6174110..c97b9a3 100644 (file)
@@ -533,10 +533,14 @@ fun vhostBody (env, makeFullHost) =
                                           TextIO.output (file, user);
                                           TextIO.output (file, " ");
                                           TextIO.output (file, group);
-                                          TextIO.output (file, "\n\tsuPHP_UserGroup ");
-                                          TextIO.output (file, user);
-                                          TextIO.output (file, " ");
-                                          TextIO.output (file, group))
+                                          (* suPHP is no longer used for fastcgi php and php 7.x *)
+                                          (if php < 6 then
+                                              (TextIO.output (file, "\n\tsuPHP_UserGroup ");
+                                               TextIO.output (file, user);
+                                               TextIO.output (file, " ");
+                                               TextIO.output (file, group))
+                                           else
+                                               ()))
                                  else
                                      ();