This commit is contained in:
2025-04-21 15:41:17 -04:00
parent c7ddeb4a89
commit 4817710a10
49 changed files with 309 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
server {
listen 8000;
server_name _;
root /app/code/web;
index index.php;
client_max_body_size 100M;
access_log /dev/stdout;
error_log /dev/stderr;
location / {
try_files $uri /index.php$is_args$args;
}
location ~ ^/index\.php(/|$) {
fastcgi_pass unix:/run/php/php-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS on;
# Forward Cloudron proxy headers
fastcgi_param HTTP_X_FORWARDED_FOR $http_x_forwarded_for;
fastcgi_param HTTP_X_FORWARDED_PROTO $http_x_forwarded_proto;
fastcgi_param HTTP_X_FORWARDED_HOST $http_x_forwarded_host;
}
# Deny access to other PHP files
location ~ \.php$ {
return 404;
}
# Rewrite app routes
location @rewriteapp {
rewrite ^(.*)$ /index.php/$1 last;
}
}