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
+28 -16
View File
@@ -1,26 +1,38 @@
# 1. PHP-FPM bağlantısını temiz ve stabil bir Proxy bloğu olarak tanımlayın
<Proxy "fcgi://127.0.0.1:{{PHP_PORT}}">
ProxySet timeout=600 connectiontimeout=600
</Proxy>
# Apache Project Configuration (CGI Mode)
# Accessed via: http://localhost:{{PORT}}/{{HOST}}/
# 2. Alias tanımı (Sonunda ASLA eğik çizgi '/' olmamalı)
# 1. Alias definition (restores localhost/projectname access)
Alias /{{HOST}} "{{PATH}}"
# 2. ScriptAlias definition for the project's PHP CGI binary
# This maps a virtual URL path to the actual PHP folder.
ScriptAlias {{PHP_BIN_URL}}/ "{{PHP_DIR}}/"
# 3. Directory settings for the project
<Directory "{{PATH}}">
Options Indexes FollowSymLinks
Options Indexes FollowSymLinks ExecCGI
AllowOverride All
Require all granted
# 3. Windows Path Sorununu Çözen Komut (Sadece bu klasöre özel zorluyoruz)
<IfModule proxy_fcgi_module>
ProxyFCGIBackendType GENERIC
</IfModule>
# 4. Klasör direkt çağrıldığında index.php'yi bulmasını garanti edin
# Passing Authorization header to PHP
CGIPassAuth On
# Directory index handling
DirectoryIndex index.php index.html
# 5. PHP Dosyalarını Yönlendirme
# PHP Handling via mod_actions and CGI
<FilesMatch "\.php$">
SetHandler "proxy:fcgi://127.0.0.1:{{PHP_PORT}}/"
SetHandler application/x-httpd-php-{{HOST}}
</FilesMatch>
# Action maps the handler to the binary via the ScriptAlias URL
# This is more robust on Windows than using absolute local paths.
Action application/x-httpd-php-{{HOST}} "{{PHP_BIN_URL}}/php-cgi.exe"
</Directory>
# 4. Permissions for the PHP binary directory
<Directory "{{PHP_DIR}}">
AllowOverride None
Options None
Require all granted
</Directory>