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
+14 -30
View File
@@ -17,6 +17,8 @@ LoadModule log_config_module modules/mod_log_config.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
LoadModule actions_module modules/mod_actions.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule setenvif_module modules/mod_setenvif.so
@@ -53,6 +55,7 @@ DocumentRoot "{{ROOT}}"
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
CGIPassAuth On
</Directory>
ErrorLog "{{LOG_DIR}}/apache_error.log"
@@ -77,39 +80,20 @@ Alias /phpmyadmin "{{PHPMYADMIN_DIR}}"
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
<FilesMatch \.php$>
SetHandler "proxy:fcgi://127.0.0.1:{{PHP_PORT}}/"
</FilesMatch>
</Directory>
# Global PHP handler
<FilesMatch \.php$>
SetHandler "proxy:fcgi://127.0.0.1:{{PHP_PORT}}/"
CGIPassAuth On
</FilesMatch>
</Directory>
# Project configurations
{{PROJECTS}}
# Custom Server Assets (Logos, CSS, Error Pages)
Alias /server-assets "D:/Works/2026/multiphp/public/server-assets"
<Directory "D:/Works/2026/multiphp/public/server-assets">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
# Global PHP handler (Manual Nginx-Style SCRIPT_FILENAME)
# Inspired by Nginx's fastcgi_param SCRIPT_FILENAME $request_filename.
<FilesMatch "\.php$">
SetHandler "proxy:fcgi://127.0.0.1:{{PHP_PORT}}/"
<IfModule rewrite_module>
RewriteEngine On
# Explicitly set the physical path to avoid broken automatic mapping on Windows
RewriteRule . - [E=proxy-fcgi-pathinfo:%{REQUEST_FILENAME}]
</IfModule>
</FilesMatch>
# Error Pages
ErrorDocument 404 /server-assets/404.html
ErrorDocument 500 /server-assets/500.html
ErrorDocument 403 /server-assets/404.html
ErrorDocument 502 /server-assets/500.html
ErrorDocument 503 /server-assets/500.html
ErrorDocument 504 /server-assets/500.html
# Custom Directory Listing (Index of)
IndexOptions +HTMLTable +IconHeight=16 +IconWidth=16 +SuppressRules +SuppressDescription +NameWidth=* +FoldersFirst +ScanHTMLTitles +CharSet=UTF-8
IndexStyleSheet "/server-assets/style.css"
HeaderName "/server-assets/header.html"
ReadmeName "/server-assets/footer.html"