feat: implement IPC handlers for managing Nginx, PHP, and MySQL service lifecycles

This commit is contained in:
Ümit Tunç
2026-03-29 00:22:25 +03:00
parent c622d3bc06
commit 248f712937
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
23324 87480
+5 -2
View File
@@ -60,15 +60,18 @@ export function registerIpcHandlers(): void {
const phpPort = portMappingService.getPhpPort(p.phpVersion) const phpPort = portMappingService.getPhpPort(p.phpVersion)
const normalizedPath = p.path.replace(/\\/g, '/') const normalizedPath = p.path.replace(/\\/g, '/')
return ` return `
location = /${p.host} {
return 301 /${p.host}/;
}
location /${p.host}/ { location /${p.host}/ {
alias "${normalizedPath}/"; alias "${normalizedPath}/";
index index.php index.html; index index.php index.html;
try_files $uri $uri/ /${p.host}/index.php?$query_string; try_files $uri $uri/ /${p.host}/index.php?$query_string;
location ~ \.php$ { location ~ ^/${p.host}/(?<rel_path>.+\.php)$ {
fastcgi_pass 127.0.0.1:${phpPort}; fastcgi_pass 127.0.0.1:${phpPort};
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_param SCRIPT_FILENAME "${normalizedPath}/$rel_path";
include "${confDir.replace(/\\/g, '/')}/fastcgi_params"; include "${confDir.replace(/\\/g, '/')}/fastcgi_params";
} }
}` }`