mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-07-30 01:32:56 +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:
@@ -40,6 +40,7 @@ $STD php artisan key:generate --force
|
||||
msg_ok "Configured Snipe-IT"
|
||||
|
||||
msg_info "Creating Service"
|
||||
PHP_SOCK=$(get_php_fpm_socket)
|
||||
cat <<EOF >/etc/nginx/conf.d/snipeit.conf
|
||||
server {
|
||||
listen 80;
|
||||
@@ -55,7 +56,7 @@ server {
|
||||
location ~ \.php\$ {
|
||||
include fastcgi.conf;
|
||||
include snippets/fastcgi-php.conf;
|
||||
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
|
||||
fastcgi_pass unix:${PHP_SOCK};
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)\$;
|
||||
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
|
||||
Reference in New Issue
Block a user