feat: add Apache server support with configuration templates and IPC management logic

This commit is contained in:
Ümit Tunç
2026-03-30 22:36:57 +03:00
parent e22b1872f0
commit 400a71f568
4 changed files with 14 additions and 11 deletions
+1 -1
View File
@@ -5,6 +5,6 @@ Alias /{{HOST}} "{{PATH}}"
Require all granted Require all granted
<FilesMatch \.php$> <FilesMatch \.php$>
SetHandler "proxy:fcgi://127.0.0.1:{{PHP_PORT}}" SetHandler "proxy:fcgi://127.0.0.1:{{PHP_PORT}}/"
</FilesMatch> </FilesMatch>
</Directory> </Directory>
+2 -3
View File
@@ -2,7 +2,6 @@ Define SRVROOT "{{SRVROOT}}"
Listen {{LISTEN_ADDRESS}}:{{PORT}} Listen {{LISTEN_ADDRESS}}:{{PORT}}
LoadModule mpm_winnt_module modules/mod_mpm_winnt.so
LoadModule authz_core_module modules/mod_authz_core.so LoadModule authz_core_module modules/mod_authz_core.so
LoadModule authz_host_module modules/mod_authz_host.so LoadModule authz_host_module modules/mod_authz_host.so
LoadModule dir_module modules/mod_dir.so LoadModule dir_module modules/mod_dir.so
@@ -47,13 +46,13 @@ Alias /phpmyadmin "{{PHPMYADMIN_DIR}}"
Require all granted Require all granted
<FilesMatch \.php$> <FilesMatch \.php$>
SetHandler "proxy:fcgi://127.0.0.1:{{PHP_PORT}}" SetHandler "proxy:fcgi://127.0.0.1:{{PHP_PORT}}/"
</FilesMatch> </FilesMatch>
</Directory> </Directory>
# Global PHP handler # Global PHP handler
<FilesMatch \.php$> <FilesMatch \.php$>
SetHandler "proxy:fcgi://127.0.0.1:{{PHP_PORT}}" SetHandler "proxy:fcgi://127.0.0.1:{{PHP_PORT}}/"
</FilesMatch> </FilesMatch>
# Project configurations # Project configurations
+4 -2
View File
@@ -43,7 +43,8 @@ async function rebuildNginxConfig(forceProjects: boolean = false): Promise<{ bin
const binPath = path.join(nginxPrefix, isWindows ? 'nginx.exe' : 'nginx') const binPath = path.join(nginxPrefix, isWindows ? 'nginx.exe' : 'nginx')
const confDir = path.join(nginxPrefix, 'conf') const confDir = path.join(nginxPrefix, 'conf')
const logDir = path.join(configService.getBasePath(), 'logs') const logDir = path.join(configService.getBasePath(), 'logs')
const rootPath = path.join(app.getAppPath(), 'www') const rootPath = path.join(configService.getBasePath(), 'www')
if (!fs.existsSync(rootPath)) fs.mkdirSync(rootPath, { recursive: true })
// Ensure directories exist // Ensure directories exist
const projectsConfDir = path.join(configService.getBasePath(), 'generated_configs', 'projects') const projectsConfDir = path.join(configService.getBasePath(), 'generated_configs', 'projects')
@@ -155,7 +156,8 @@ async function rebuildApacheConfig(forceProjects: boolean = false): Promise<{ bi
const apacheRoot = path.dirname(path.dirname(binPath)) // bin'in üstü const apacheRoot = path.dirname(path.dirname(binPath)) // bin'in üstü
const logDir = path.join(configService.getBasePath(), 'logs') const logDir = path.join(configService.getBasePath(), 'logs')
const rootPath = path.join(app.getAppPath(), 'www') const rootPath = path.join(configService.getBasePath(), 'www')
if (!fs.existsSync(rootPath)) fs.mkdirSync(rootPath, { recursive: true })
// Ensure directories exist // Ensure directories exist
const projectsConfDir = path.join(configService.getBasePath(), 'generated_configs', 'projects_apache') const projectsConfDir = path.join(configService.getBasePath(), 'generated_configs', 'projects_apache')
+2
View File
@@ -1357,11 +1357,13 @@ function App(): JSX.Element {
<EditIcon fontSize="small" /> <EditIcon fontSize="small" />
</IconButton> </IconButton>
</Tooltip> </Tooltip>
{project.serverType !== 'apache' && (
<Tooltip title="Nginx Ayarları"> <Tooltip title="Nginx Ayarları">
<IconButton size="small" onClick={() => handleOpenProjectNginxConfig(project.host)} sx={{ color: 'rgba(255,255,255,0.4)', '&:hover': { color: '#39A7FF' } }}> <IconButton size="small" onClick={() => handleOpenProjectNginxConfig(project.host)} sx={{ color: 'rgba(255,255,255,0.4)', '&:hover': { color: '#39A7FF' } }}>
<TerminalIcon fontSize="small" /> <TerminalIcon fontSize="small" />
</IconButton> </IconButton>
</Tooltip> </Tooltip>
)}
<Tooltip title="Sil"> <Tooltip title="Sil">
<IconButton size="small" onClick={() => handleRemoveProject(project.id)} sx={{ color: 'rgba(255,255,255,0.4)', '&:hover': { color: '#ff4444' } }}> <IconButton size="small" onClick={() => handleRemoveProject(project.id)} sx={{ color: 'rgba(255,255,255,0.4)', '&:hover': { color: '#ff4444' } }}>
<DeleteIcon fontSize="small" /> <DeleteIcon fontSize="small" />