Answers to common server and Nginx questions when hosting Swiftchats. Expand a question to see the steps or explanation.Documentation Index
Fetch the complete documentation index at: https://swiftchats-documentation.axis96.com/llms.txt
Use this file to discover all available pages before exploring further.
How to install in Nginx
Use Nginx as a reverse proxy to your Swiftchats (Laravel) app and to Evolution API (bound to127.0.0.1:8080 in Docker). Replace example domains and paths with your own.
How do I install Nginx on Ubuntu?
How do I install Nginx on Ubuntu?
How do I configure Nginx for Swiftchats (Laravel)?
How do I configure Nginx for Swiftchats (Laravel)?
Point the document root at Laravel’s Enable the site, validate the configuration, and reload Nginx:Replace
public directory and pass PHP to PHP-FPM.Create a server block (example: /etc/nginx/sites-available/swiftchats):yourdomain.com, /var/www/swiftchats/public, and the php8.2-fpm socket path with your actual values (your PHP version may differ).How do I set up a reverse proxy for the Evolution API?
How do I set up a reverse proxy for the Evolution API?
Expose Evolution API on its own hostname (or subdomain). The URL must match Enable, test, and reload:In Swiftchats, set
SERVER_URL in Evolution’s .env (for example https://evolution.yourdomain.com after TLS).Create a server block (example: /etc/nginx/sites-available/evolution-api):EVOLUTION_BASE_URL to the same public base URL you use for Evolution.How do I enable HTTPS with Certbot?
How do I enable HTTPS with Certbot?
SERVER_URL and EVOLUTION_BASE_URL use https:// after certificates are in place.Media, chats, and API issues
Why are media files not sent in chats or campaigns?
Why are media files not sent in chats or campaigns?
A common issue with Nginx is media files not being sent in chats or campaigns. To resolve this, remove the following block from your site Then run
.conf file:sudo nginx -t and sudo systemctl reload nginx.Why do I get HTTP 403 on PUT, DELETE, or API requests?
Why do I get HTTP 403 on PUT, DELETE, or API requests?
If browser or app requests that use
PUT, DELETE, PATCH, or other REST-style methods return 403 Forbidden (often on JSON or /api/... routes), the request may be blocked before it reaches the Swiftchats (Laravel) application.Common causes on shared hosting and control panels (for example cPanel, CWP (CentOS Web Panel), Plesk, and similar) include:- ModSecurity (ModSec) and other WAF rules that treat non-
GET/POSTtraffic, large JSON bodies, or certain URL patterns as suspicious and respond with 403. - Host-level security (e.g. Imunify360, custom firewall rules) that applies the same kind of filtering at the edge.
- Stricter than necessary
Limit/LimitExcept(Apache) or equivalent method allowlists, though this is less common on typical Laravel deployments than ModSec/WAF defaults.
