tools.func: add nginx site helper and PHP socket resolver (#16118)

This commit is contained in:
CanbiZ (MickLesk)
2026-07-28 19:47:13 +02:00
committed by GitHub
parent 7046b72981
commit 8029b208a6
51 changed files with 169 additions and 166 deletions

View File

@@ -49,6 +49,7 @@ chmod -R 755 /opt/2fauth
msg_ok "Setup 2fauth"
msg_info "Configure Service"
PHP_SOCK=$(get_php_fpm_socket)
cat <<EOF >/etc/nginx/conf.d/2fauth.conf
server {
listen 80;
@@ -67,7 +68,7 @@ server {
error_page 404 /index.php;
location ~ \.php\$ {
fastcgi_pass unix:/var/run/php/php${PHP_VERSION}-fpm.sock;
fastcgi_pass unix:${PHP_SOCK};
fastcgi_param SCRIPT_FILENAME \$realpath_root\$fastcgi_script_name;
include fastcgi_params;
}