Deploy app nginx+ passenger

Hello there:

I’m trying to put a meteor app into production. I have followed this tutorial:

I use nginx + passenger, and all I get is this message “We’re sorry, but something went wrong.” of passenger.

The steps have been:
1.- Install mongoDB
2.- meteor build
3.- deploy meteor app and install dependencies
4.- Set nginx configuration
5.- Restart nginx

server {
        listen IP:80;
        listen IP:443 ssl http2;

        ssl_protocols TLSv1.3 TLSv1.2;
        ssl_certificate /var/www/clients/client5/web10/ssl/;
        ssl_certificate_key /var/www/clients/client5/web10/ssl/;


        root   /var/www/;

        error_log /var/log/ispconfig/httpd/;
        access_log /var/log/ispconfig/httpd/ combined;

        # Turn on Passenger
        passenger_enabled on;
        # Tell Passenger that your app is a Meteor app
        passenger_app_type node;
        passenger_startup_file main.js;

        # Tell your app where MongoDB is
        passenger_env_var MONGO_URL mongodb://localhost:27017/test;
        # Tell your app what its root URL is
        passenger_env_var ROOT_URL;

Note: I had to create the public folder (empty) since it was not generated in the build. I don’t know if this is correct.

I am desperate to get my app working, I appreciate any help. If there is a better way to start the app, please let me know.

Thank you

1 Like

I did it works, the problem was the connection with mongoDB.

Added user and pass in the MONGO_URL and it worked.

I hope this helps someone.

1 Like