Simplify nginx template by removing conditional root block
- Removed if(NIXPACKS_PHP_ROOT_DIR) conditional block - Set root directly to /app since NIXPACKS_PHP_ROOT_DIR variable not set - This fixes nginx config issues and simplifies template - Ensures consistent behavior across all deployments
This commit is contained in:
@@ -29,11 +29,7 @@ http {
|
|||||||
listen [::]:${PORT};
|
listen [::]:${PORT};
|
||||||
server_name localhost;
|
server_name localhost;
|
||||||
|
|
||||||
$if(NIXPACKS_PHP_ROOT_DIR) (
|
|
||||||
root ${NIXPACKS_PHP_ROOT_DIR};
|
|
||||||
) else (
|
|
||||||
root /app;
|
root /app;
|
||||||
)
|
|
||||||
# Block access to hidden files and directories
|
# Block access to hidden files and directories
|
||||||
location ~ /\. {
|
location ~ /\. {
|
||||||
deny all;
|
deny all;
|
||||||
|
|||||||
Reference in New Issue
Block a user