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