Nginx Configuration
Configure Drako Tickets to run on your own domain with Nginx, HTTPS, and PM2.
Prerequisites
cd /var/www
ls2
3
4
5
Create the Nginx Configuration
sudo nano /etc/nginx/sites-available/tickets.example.comserver {
listen 80;
listen [::]:80;
server_name tickets.example.com;
client_max_body_size 12M;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
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;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_cache_bypass $http_upgrade;
}
}6
7
8
Troubleshooting
Nginx shows 502 Bad Gateway
The domain does not open
Nginx configuration test fails
Emails, OAuth callbacks, or Discord links use the wrong URL
View application or Nginx logs
Useful References
Last updated