Files
KNELProductionContainers/Techops/homechart.knownelement.com/nginx.conf

42 lines
1.2 KiB
Nginx Configuration File

server {
listen 3000;
server_name localhost;
# Add proper headers for running behind Cloudron's proxy
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
client_max_body_size 100M;
# Custom Cloudron error pages
error_page 403 /error/403.html;
error_page 404 /error/404.html;
error_page 50x /error/50x.html;
location ^~ /error/ {
alias /app/code/public/error/;
internal;
}
# Use Cloudron's runtime directory for nginx (read-only filesystem)
client_body_temp_path /run/nginx/body;
proxy_temp_path /run/nginx/proxy;
fastcgi_temp_path /run/nginx/fastcgi;
uwsgi_temp_path /run/nginx/uwsgi;
scgi_temp_path /run/nginx/scgi;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400;
}
# Needed for Cloudron's health checks
location = /healthcheck {
access_log off;
return 200;
}
}