Can't find deployed app

149 Views Asked by At

I deployed my first meteor app on a digital-ocean droplet using mup. So it's there but I can't figure out what I still have to setup to actually view my app. So when I go to www.example.com I should see it but all I see is an apache page.

1

There are 1 best solutions below

3
On BEST ANSWER

When you start a Meteor app, you can specify the port for it to listen on using the --port argument. For it to be available from at you domain name specify port 80. Though if you have Apache listening on that port already it will fail to bind to it. Uninstall or stop Apache, and restart your Meteor app.

If you are using Apache to serve other content and can not stop it, you'll need to have your Meteor run on a different port with an Apache ProxyPass. First enable mod_proxy and mod_proxy_http

sudo a2enmod proxy proxy_http

Then create a new VirtualHost for the Meteor app that proxies request to the port you have decided to have it listen on. It will look something like:

<VirtualHost *:80>
        ServerName www.example.com

        ProxyPass / http://localhost:3000/
        ProxyPassReverse / http://localhost:3000/

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

See this article for all the details.