Have a single public IP and multiple backend private IPs to be able to run multiple sites via a reverse proxy thru nginx to Apache backends?

December 6, 2017 127 views
Apache Nginx Ubuntu

I currently have multiple;tiple sites/domains being hosted on a couple droplets with separate external IP's. I would like to consolidate this into one IP so I have one droplet running NGinx reverse proxy to pass requests off to the Apache servers on the backend droplets. Is there a tutorial for this? Is this doable?

3 Answers

Yes, in tomcat server.xml you simply specify separate ports, like 8080, 8082, and 8443. You can even have some https and some http running on the same ip.

Sorry spoke too soon, I do not think this is possible unless you are using the dedicated server option.

  • I like to think before I speak.

    • Then again, the image you are on may support it. You should find information on mod_proxy under your http provider, mine is Apache and there is good documentation available on the download site.
      My web server is tomcat and there is further documentation on mod-proxy there. It is in Tomcat that I specified which port is used by each web.
      Perhaps your application servers provide equivalent documents.
      For me Apache is also the provider of SSL services.

no attachment capability here or I would attach the configs that work for this...

Have another answer? Share your knowledge.