I have a few servers using aapanel, after configuring reverse proxy for nginx, the domain is in "loading" state and then leads to 502 timeout (I use Cloudfalre dns).
"I make sure the port is open and accessible via Ip😛ort"
server
{
listen 80;
server_name api.xxxxx.com;
location / {
proxy_pass http://localhost:3333;
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 Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
access_log /www/wwwlogs/api.xxxxx.com.log;
error_log /www/wwwlogs/api.xxxxxx.com.error.log;
}