feat: implement Nginx configuration management and update default Apache port in settings
This commit is contained in:
@@ -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}`
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user