Some routes are not working after closing terminal window, gunicorn, flask, ec2, aws

I have my flask app running on ec2 instance with nginx and gunicorn3. The problem that I have is the following.
When I SSH into the EC2 machine and start the Gunicorn server gunicorn3 app:app, all routes work fine and I can use then. But, …