feat: implement Nginx configuration management and update default Apache port in settings

This commit is contained in:
Ümit Tunç
2026-04-01 23:19:41 +03:00
parent 6d14569ec6
commit 3722942ea0
5 changed files with 50 additions and 61 deletions
+7 -1
View File
@@ -195,10 +195,16 @@ async function rebuildApacheConfig(forceProjects: boolean = false): Promise<{ bi
let normalizedPath = p.path.replace(/\\/g, '/')
if (!normalizedPath.endsWith('/')) normalizedPath += '/'
const phpDir = path.join(configService.getBasePath(), 'bin', `php-${p.phpVersion}`)
const phpCgiBinary = findExecutable(phpDir, process.platform === 'win32' ? 'php-cgi.exe' : 'php-cgi') || ''
await configService.generateConfig('apache_project.conf.template', `projects_apache/${p.host}.conf`, {
HOST: p.host,
PATH: normalizedPath,
PHP_PORT: phpPort.toString()
PHP_PORT: phpPort.toString(),
PHP_DIR: phpDir.replace(/\\/g, '/'),
PHP_CGI_PATH: phpCgiBinary.replace(/\\/g, '/'),
PHP_BIN_URL: `/php-bin-${p.host}`
})
}
}