Report this

What is the reason for this report?

How do I set up a subdomain to run with Meteor?

Posted on July 31, 2016

Hi,

I am running meteor with Nginx on my Ubuntu droplet, and would like to configure a subdomain to serve up static files at media.my-app-name.com. The DNS tutorial worked a treat, but my attempts to use the tutorial on NGINX config here was unsuccessful. Upon running service [my app name] restart, the process fails.

Attempts to work around this issue came up short. For example, adding another server { } block (with the relevant other info) into the preexisting nginx config file, disabling the default_server setting and trying various approaches that way didn’t work. The closest I got was to get the Meteor app mirrored on my subdomain, instead of serving up the files at the public_html document root given in the tutorial.

Of course, I noticed the comment in the nginx config saying “root is irrelevant,”—now that’s where I’m stuck. Googling didn’t turn up any further info to help with that. So, I would be deeply thankful if someone could point me in the right direction. I’m so close to launching this app, a year in the making, and I need a lifeline.

Yours very truly,

David



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi Ryan,

I managed to resolve this issue, thanks to reading the tutorial here. Turns out running a separate subdomain wasn’t necessary (though it is certainly possible). Instead, I just needed to understand how block and location selection works in nginx.

Thanks for reaching out! :)

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.