By Bloodmorphed
So I have a main loader called:
kog-game-loader which uses a certificate
I want: thidomain.org to run one http server and test.thisdomain.org to run another
Both of them going through the same loader and having a certificate.
EDIT: Sorry, the servers would run on two different droplets as well.
Is this possible?
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!
Hey friend,
This is fine but you would need a virtual host (Apache) / server block (Nginx) on each server that routes the traffic for the requested website. You can do this:
- Load Balancer
-- Droplet 1
---- Site 1
---- Site 2
-- Droplet 2
---- Site 1
---- Site 2
But you can’t do this reasonably:
- Load Balancer
-- Droplet 1
---- Site 1
-- Droplet 2
---- Site 2
These may help you in configuring the web server for it:
https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04 https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-16-04
Jarland
Hello, @jarland.
You say I can route 2 different domains through 1 loadbalancer? I don’t think you can do that…
What I wanted is: web.xxx.com:443 -> loadbalancer (with SSL termination) -> droplet-1:80 api.xxx.com:443 -> loadbalancer (with SSL termination) -> droplet-1:80
The thing is that it doesn’t let me have 2 rules with the same port. I can only understand this if the routing is done in layer 4, but if routing is done in layer 7 (which is HTTP layer), it should be able to map the domain names to the correct rules.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.