feat: implement project management system with Nginx configuration templates and automated host file updates
This commit is contained in:
@@ -1,38 +1,33 @@
|
||||
# Apache Project Configuration (CGI Mode)
|
||||
# Accessed via: http://localhost:{{PORT}}/{{HOST}}/
|
||||
<VirtualHost *:{{PORT}}>
|
||||
ServerName {{HOST}}
|
||||
DocumentRoot "{{PATH}}"
|
||||
|
||||
# 1. Alias definition (restores localhost/projectname access)
|
||||
Alias /{{HOST}} "{{PATH}}"
|
||||
<Directory "{{PATH}}">
|
||||
Options Indexes FollowSymLinks ExecCGI
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
|
||||
# Passing Authorization header to PHP
|
||||
CGIPassAuth On
|
||||
|
||||
# Directory index handling
|
||||
DirectoryIndex index.php index.html
|
||||
|
||||
# PHP Handling via mod_actions and CGI
|
||||
<FilesMatch "\.php$">
|
||||
SetHandler application/x-httpd-php-{{HOST}}
|
||||
</FilesMatch>
|
||||
|
||||
# Action maps the handler to the binary via the ScriptAlias URL
|
||||
Action application/x-httpd-php-{{HOST}} "{{PHP_BIN_URL}}/php-cgi.exe"
|
||||
</Directory>
|
||||
|
||||
# 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 ExecCGI
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
# ScriptAlias definition for the project's PHP CGI binary
|
||||
ScriptAlias {{PHP_BIN_URL}}/ "{{PHP_DIR}}/"
|
||||
|
||||
# Passing Authorization header to PHP
|
||||
CGIPassAuth On
|
||||
|
||||
# Directory index handling
|
||||
DirectoryIndex index.php index.html
|
||||
|
||||
# PHP Handling via mod_actions and CGI
|
||||
<FilesMatch "\.php$">
|
||||
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>
|
||||
<Directory "{{PHP_DIR}}">
|
||||
AllowOverride None
|
||||
Options None
|
||||
Require all granted
|
||||
</Directory>
|
||||
</VirtualHost>
|
||||
Reference in New Issue
Block a user