I recently deployed Coolify on my server and wanted to share the Nginx configuration i used to make it work.
Initially, i faced an issue where realtime features and live logs weren’t working properly this was due to WebSocket connections not being handled correctly after some tweaking i found a working configuration that fixed the problem
Here is the config i used
server {
listen 80;
server_name coolify.hisalman.in;
location ^~ /terminal/ws {
proxy_pass http://localhost:6002;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
location ^~ /app/ {
proxy_pass http://localhost:6001;
proxy_set_header Host $host;
}
# main app
location / {
proxy_pass http://localhost:8000;
proxy_set_header Host $host;
}
}