Fix file access permissions and group ownership for Apache2 SSL
[apache2-cn.git] / debian / postinst
index 335fabb..cca66c1 100755 (executable)
@@ -396,9 +396,19 @@ if [ -e "$CONF" ]; then
        fi
 
        if [ ! -e "$A2MODEDIR/php5.load" ] || [ ! -e "$A2MODEDIR/php5.conf" ]; then
+           if [ -e "/usr/lib/apache2/modules/libphp5.so" ]; then
                cp_echo "CN: Enabling PHP5 module for Apache2 web server."
                a2enmod php5 >/dev/null || true
                need_restart=1
+           fi
+       fi
+
+       if [ ! -e "$A2MODEDIR/php4.load" ] || [ ! -e "$A2MODEDIR/php4.conf" ]; then
+            if [ -e "/usr/lib/apache2/modules/libphp4.so" ]; then
+               cp_echo "CN: Enabling PHP4 module for Apache2 web server."
+               a2enmod php4 >/dev/null || true
+               need_restart=1
+            fi
        fi
 
        if [ ! -e "$A2MODEDIR/ssl.load" ] || [ ! -e "$A2MODEDIR/ssl.conf" ]; then