Question
How do i use nginx to host multiple applications on one droplet? ie 2 ghost blogs and 1 php website
How do I use nginx to serve up multiple applications on one droplet.
Ex. I make 1 droplet ( because I only can afford one droplet )
Use nginx to serve up three applications like Two ghost instances and 1 php application ( made by yours truly ).
Is this even possible?
I’ve read I can use nginx as a reverse proxy ( this was only one idea, but I wasn’t sure how to implement this for multiple applications on one droplet )
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.
×
It all depends on the size of the droplet and how big the sites are that determines how many sites you can host. But you just set up multiple virtual hosts within the conf of Nginx.
MrPeppah is it possible to make the urls to look like
www.example.com/ghostOneBlog
www.example.com/ghostTwoBlog
www.example.com/myphpapplication
I don’t think so with the ghost blogs. Most of the time its done as
site1.domain.com
site2.domain.com
site3.domain.com
and not as folders. But I’m sure anything is possible. You would just look up reverse proxy for sub directories and configure each ghost blog to run on different ports.
I contemplated that idea too to do a reverse proxy, but then would i need another server to get to the separate applications ?
Nope, just multiple virtual hosts. Google Nginx virtual hosts. Each would have its own “server block”, two reverse proxies and a normal entry. The sub domain would be the route I would go.
Cool I’ll look at that!