X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plc.d%2Fhttpd;h=6180e6eae012bb9be6007c0992359c899cb6c96d;hb=aab7636f16f072802f91f20b8f2307570d290e04;hp=572176d711980295c1a6ba566c527b683a7e8aed;hpb=2bc14d8dc246725d040c119348991a8e2dc24b84;p=myplc.git diff --git a/plc.d/httpd b/plc.d/httpd index 572176d..6180e6e 100755 --- a/plc.d/httpd +++ b/plc.d/httpd @@ -85,7 +85,8 @@ case "$1" in fi # configure php-fpm as well if present (starting with f27) - [ -d $php_fpm_dir ] && cat > $php_fpm_conf << EOF + if [ -d $php_fpm_dir ] ; then + cat > $php_fpm_conf << EOF [www] php_value[include_path] = $include_path php_value[open_basedir] = $open_basedir @@ -93,6 +94,11 @@ php_value[date.timezone] = GMT php_value[short_open_tag] = On php_value[memory_limit] = 80M EOF + # this is needed because otherwise, the first time + # we do this configuration, the service is already up + # and the config is usable only the second time + systemctl restart php-fpm + fi # Disable default Listen directive sed -i -e '/^Listen/d' $httpd_conf @@ -177,7 +183,7 @@ EOF # with mod_python preferred if rpm -q mod_python >& /dev/null ; then configure_for_mod_python=true - elif rpm -q mod_wsgi >& /dev/null ; then + elif rpm -q mod_wsgi >& /dev/null || rpm -q python2-mod_wsgi >& /dev/null ; then configure_for_mod_wsgi=true else echo "Requires mod_python or mod_wsgi.... exiting"