feat: implement IPC handlers for managing Nginx, PHP, and MySQL service lifecycles
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
|||||||
23324
|
87480
|
||||||
|
|||||||
@@ -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";
|
||||||
}
|
}
|
||||||
}`
|
}`
|
||||||
|
|||||||
Reference in New Issue
Block a user