mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-23 20:57:17 +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:
@@ -80,7 +80,7 @@ sed -i "s/listen = \/run\/php\/php8.4-fpm.sock/listen = \/run\/php-fpm-librenms.
|
||||
msg_ok "Configured PHP-FPM"
|
||||
|
||||
msg_info "Configure Nginx"
|
||||
cat <<EOF >/etc/nginx/sites-enabled/librenms
|
||||
cat <<EOF >/etc/nginx/sites-available/librenms
|
||||
server {
|
||||
listen 80;
|
||||
server_name ${LOCAL_IP};
|
||||
@@ -103,8 +103,7 @@ server {
|
||||
}
|
||||
}
|
||||
EOF
|
||||
rm /etc/nginx/sites-enabled/default
|
||||
$STD systemctl reload nginx
|
||||
nginx_enable_site librenms
|
||||
systemctl restart php8.4-fpm
|
||||
msg_ok "Configured Nginx"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user