refs #1134 use php-fpm opengnsys
testing/og-dhcp-API/pipeline/head There was a failure building this commit
Details
testing/og-dhcp-API/pipeline/head There was a failure building this commit
Details
parent
6afc14fb9a
commit
dbd3f88101
|
@ -18,7 +18,7 @@ server {
|
||||||
# Bloque para manejar las solicitudes a index.php
|
# Bloque para manejar las solicitudes a index.php
|
||||||
location ~ ^/index.php(/|$) {
|
location ~ ^/index.php(/|$) {
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
fastcgi_pass unix:/run/php/php__PHPVERSION__-fpm.sock; # Asegúrate de que esto sea correcto
|
fastcgi_pass unix:/run/php/php__PHPVERSION__-fpm-opengnsys.sock;
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
|
|
|
@ -432,14 +432,20 @@ modify_php_fpm_config() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
php_fpm_conf_path="/etc/php/$php_version/fpm/pool.d/www.conf"
|
php_fpm_conf_path="/etc/php/$php_version/fpm/pool.d/www.conf"
|
||||||
new_fpm_conf_path="/etc/php/$php_version/fpm/pool.d/ogdhcp.conf"
|
new_fpm_conf_path="/etc/php/$php_version/fpm/pool.d/opengnsys.conf"
|
||||||
socket_path="/run/php/php$php_version-fpm-ogdhcp.sock"
|
socket_path="/run/php/php$php_version-fpm-opengnsys.sock"
|
||||||
|
|
||||||
# Copiar el archivo www.conf a ogdhcp.conf
|
# Verificar si el archivo new_fpm_conf_path ya existe
|
||||||
|
if [[ -f "$new_fpm_conf_path" ]]; then
|
||||||
|
echo "El archivo $new_fpm_conf_path ya existe. No se realizarán modificaciones."
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Copiar el archivo www.conf a opengnsys.conf
|
||||||
cp "$php_fpm_conf_path" "$new_fpm_conf_path"
|
cp "$php_fpm_conf_path" "$new_fpm_conf_path"
|
||||||
|
|
||||||
# Modificar el archivo ogdhcp.conf
|
# Modificar el archivo ogdhcp.conf
|
||||||
sed -i 's/\[www\]/[ogdhcp]/g' "$new_fpm_conf_path"
|
sed -i 's/\[www\]/[opengnsys]/g' "$new_fpm_conf_path"
|
||||||
sed -i 's/user = www-data/user = opengnsys/g' "$new_fpm_conf_path"
|
sed -i 's/user = www-data/user = opengnsys/g' "$new_fpm_conf_path"
|
||||||
sed -i 's/group = www-data/group = opengnsys/g' "$new_fpm_conf_path"
|
sed -i 's/group = www-data/group = opengnsys/g' "$new_fpm_conf_path"
|
||||||
sed -i "s|listen =.*|listen = $socket_path|g" "$new_fpm_conf_path"
|
sed -i "s|listen =.*|listen = $socket_path|g" "$new_fpm_conf_path"
|
||||||
|
|
Loading…
Reference in New Issue