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
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! :)
Click below to sign up and get $100 of credit to try our products over 60 days!
Can you share your current nginx server block(s)? Creating a second server block to serve static content should be pretty straightforward and I should be able to take your existing server block and help you craft an updated nginx configuration.