nginx dont work tomcat with mysql.
502 Bad Gateway - nginx/1.10.0 (Ubuntu)/
My system: mysql, java vraptor 3 with hibernate.
tomcat8 -> I installed following the manual https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-8-on-ubuntu-16-04
nginx installed: https://www.digitalocean.com/community/questions/1-1-web-domain-redirect-to-tomcat-instance-on-digitalocean-droplet
Works with html page, but I have this error when I put a system that accesses mysql, it gets to work later so, when the bank is empty sometimes it works afterwards too, help me I can not take it anymore.