mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-07-29 17:22:53 +02:00
Standardize nginx setup in install scripts
Refactors many install scripts to use the shared `nginx_enable_site` helper instead of manual symlink/default-site/reload sequences, making webserver setup more consistent and less error-prone. It also replaces hardcoded PHP-FPM socket paths with `get_php_fpm_socket` (including templated substitutions where needed) across nginx and caddy configs to improve compatibility with varying PHP versions and socket locations.
This commit is contained in:
@@ -68,10 +68,11 @@ msg_ok "Set up SolidTime"
|
||||
|
||||
msg_info "Configuring Caddy"
|
||||
PHP_VER=$(php -r 'echo PHP_MAJOR_VERSION . "." . PHP_MINOR_VERSION;')
|
||||
PHP_SOCK=$(get_php_fpm_socket)
|
||||
cat <<EOF >/etc/caddy/Caddyfile
|
||||
:80 {
|
||||
root * /opt/solidtime/public
|
||||
php_fastcgi unix//run/php/php${PHP_VER}-fpm.sock
|
||||
php_fastcgi unix/${PHP_SOCK}
|
||||
file_server
|
||||
encode gzip
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user