Host static website alongside Meteor app

Hello,

This question might be answered somewhere, but I can’t find updated guidance about the best way to do this.

  1. I need to serve a static website with html,css and javascript/jQuery files inside www.example.com.
    I also need to host an existing Meteor app on www.meteorapp.example.com
    What would be the correct way to build this?

  2. Without using subdomains:
    Can I just put all static html/css/js files inside the public folder and go to www.meteorap.com/static-content.html and see the landing page’s content there?
    What, for example, would be the absolute URL path from a file placed at /public/landing-page.html to access it’s linked styles.css or jQueryPlugin.js files?

I must note that both the Meteor app and the static website are already hosted on different domains, using different css frameworks (Materialize for the Meteor app and Bootstrap for the static website) and server providers (Digital Ocean for the Meteor app and Bluehost for static website).

I’d very much appreciate some feedback about the propper way to solve this.
Thank you!

I would put them both behind nginx, which gives you the option of putting either site on a subdomain or in a subdirectory.
Then both sites don’t need to be aware of each other either

How would I configure nginx to work the way you mention with Meteor?
I’m considering moving into Meteor Galaxy hosting. Would that simplify this proccess?

I’m not experienced in devops :smiley:

1 Like