isProxyShouldRun()) { throw new \Exception("Proxy should not run"); } $status = getContainerStatus($server, 'coolify-proxy'); if ($status === 'running') { $server->proxy->set('status', 'running'); $server->save(); return 'OK'; } $ip = $server->ip; if ($server->id === 0) { $ip = 'host.docker.internal'; } $connection = @fsockopen($ip, '80'); $connection = @fsockopen($ip, '443'); $port80 = is_resource($connection) && fclose($connection); $port443 = is_resource($connection) && fclose($connection); ray($ip); if ($port80) { throw new \Exception("Port 80 is in use.
You must stop the process using this port.
Docs: https://coolify.io/docs
Discord: https://coollabs.io/discord"); } if ($port443) { throw new \Exception("Port 443 is in use.
You must stop the process using this port.
Docs: https://coolify.io/docs
Discord: https://coollabs.io/discord>"); } } }