diff options
author | Ramón M. Gómez <ramongomez@us.es> | 2018-11-15 16:11:31 +0100 |
---|---|---|
committer | Ramón M. Gómez <ramongomez@us.es> | 2018-11-15 16:11:31 +0100 |
commit | 37481d8781c8f9b023ecd34c125f28c4b1e96381 (patch) | |
tree | 2ebd3a11491d38b618cacbc04837bf00d3350c83 /installer/opengnsys_update.sh | |
parent | b351d8afce7769df7e57c13c88efc3b1346d031e (diff) |
#784: Apache configuration now supports connection with PHP-FPM via socket and port.
Diffstat (limited to 'installer/opengnsys_update.sh')
-rwxr-xr-x | installer/opengnsys_update.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh index 91505c75..a2a818ee 100755 --- a/installer/opengnsys_update.sh +++ b/installer/opengnsys_update.sh @@ -572,7 +572,13 @@ function apacheConfiguration () sockfile=$(find /run/php -name "php*.sock" -type s -print 2>/dev/null) # Actualizar configuración de Apache a partir de fichero de plantilla. for config in $APACHECFGDIR/{,sites-available/}opengnsys.conf; do - [ -e $config ] && sed -e "s,CONSOLEDIR,$INSTALL_TARGET/www,g; s/SOCKETFILE/$socketfile/g" $template > $config + if [ -e $config ]; then + if [ -n "$sockfile" ]; then + sed -e "s,CONSOLEDIR,$INSTALL_TARGET/www,g; s,proxy:fcgi:.*,proxy:unix:${sockfile%% *}|fcgi://localhost\",g" $template > $config + else + sed -e "s,CONSOLEDIR,$INSTALL_TARGET/www,g" $template > $config + fi + fi done # Reiniciar Apache. |