mirror of
https://github.com/coollabsio/coolify.git
synced 2026-08-24 10:05:47 -05:00
70 lines
1.8 KiB
Plaintext
70 lines
1.8 KiB
Plaintext
listen 8080 default_server;
|
|
listen [::]:8080 default_server;
|
|
|
|
root /var/www/html/public;
|
|
|
|
# Set allowed "index" files
|
|
index index.html index.htm index.php;
|
|
|
|
server_name _;
|
|
|
|
charset utf-8;
|
|
|
|
# Set max upload to 2048M
|
|
client_max_body_size 2048M;
|
|
|
|
# Set client body buffer to handle Sentinel payloads in memory
|
|
client_body_buffer_size 256k;
|
|
|
|
# Healthchecks: Set /healthcheck to be the healthcheck URL
|
|
location /healthcheck {
|
|
access_log off;
|
|
|
|
# set max 5 seconds for healthcheck
|
|
fastcgi_read_timeout 5s;
|
|
|
|
include fastcgi_params;
|
|
fastcgi_param SCRIPT_NAME /healthcheck;
|
|
fastcgi_param SCRIPT_FILENAME /healthcheck;
|
|
fastcgi_pass 127.0.0.1:9000;
|
|
}
|
|
|
|
# Proxy Coolify's websocket services through the same endpoint as the dashboard.
|
|
location ^~ /app/ {
|
|
proxy_pass http://coolify-realtime:6001;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_read_timeout 3600s;
|
|
proxy_send_timeout 3600s;
|
|
}
|
|
|
|
location = /terminal/ws {
|
|
proxy_pass http://coolify-realtime:6002;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_read_timeout 3600s;
|
|
proxy_send_timeout 3600s;
|
|
}
|
|
|
|
# Have NGINX try searching for PHP files as well
|
|
location / {
|
|
try_files $uri $uri/ /index.php?$query_string;
|
|
}
|
|
|
|
# Pass "*.php" files to PHP-FPM
|
|
location ~ \.php$ {
|
|
fastcgi_pass 127.0.0.1:9000;
|
|
fastcgi_index index.php;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
include fastcgi_params;
|
|
fastcgi_buffers 16 16k;
|
|
fastcgi_buffer_size 32k;
|
|
fastcgi_read_timeout 99;
|
|
}
|