From 248f712937c44a5b41948cbe7a34ab1c97ad1c0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9Cmit=20Tun=C3=A7?= Date: Sun, 29 Mar 2026 00:22:25 +0300 Subject: [PATCH] feat: implement IPC handlers for managing Nginx, PHP, and MySQL service lifecycles --- logs/nginx.pid | 2 +- src/main/ipc/index.ts | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/logs/nginx.pid b/logs/nginx.pid index 774222b..d8ea9fb 100644 --- a/logs/nginx.pid +++ b/logs/nginx.pid @@ -1 +1 @@ -23324 +87480 diff --git a/src/main/ipc/index.ts b/src/main/ipc/index.ts index cff5cda..1f29553 100644 --- a/src/main/ipc/index.ts +++ b/src/main/ipc/index.ts @@ -60,15 +60,18 @@ export function registerIpcHandlers(): void { const phpPort = portMappingService.getPhpPort(p.phpVersion) const normalizedPath = p.path.replace(/\\/g, '/') return ` + location = /${p.host} { + return 301 /${p.host}/; + } location /${p.host}/ { alias "${normalizedPath}/"; index index.php index.html; try_files $uri $uri/ /${p.host}/index.php?$query_string; - location ~ \.php$ { + location ~ ^/${p.host}/(?.+\.php)$ { fastcgi_pass 127.0.0.1:${phpPort}; fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_param SCRIPT_FILENAME "${normalizedPath}/$rel_path"; include "${confDir.replace(/\\/g, '/')}/fastcgi_params"; } }`