Error - nginx 403 or 502?

fresh install on fresh VPS results in Not Permitted at the first Admin login.
public IP were set in site config,
chrome console shows Public IP as destination with forbidden status such as,

http://Public_IP/assets/frappe/js/lib/bootstrap.min.js

while nginx log shows 502 error,

Connect() failed (111: Connection refused) while connecting to upstream

Please advise on the nature of this error.

Check application server(supervisor frappe-bench-web:) is running or not

well, error was due to trying to access using naked IP.
It works now after get it behind caddy server with TLS