How host two domains on a single linode?

I have two domains registered that used to be hosted through another service. Let's call them domainA.com and domainB.com. The first is now being hosted on my Linode, and domainB.com is dormant.

I'm using Jetty to host domainA.com. The content is static. I'm willing to switch to another hosting program if helpful.

For hosting the second domain, I recently started playing around with Docker, and made an nginx-alpine based docker file that is able to display the desired content (also static). But the only way to address this content is with the address http://domainA.com:8080/index.htm.

I'd like to be able to browse this content using the http://domainB.com address!

I had assumed it wouldn't be difficult to figure out how to do this given that the Linode Dashboard has provisions for managing multiple domains. But now that I'm trying to actually do this, I'm baffled. How do two web server programs compete with each other to service port 80/443? Or how might one set up a single server to intelligently handle the incoming web clients?

Is there a guide or basic roadmap for how one could set this up?

2 Replies

Thanks for this reminder. I'd forgotten to look here because I'm not especially happy using Jetty. It's got annoying additional steps for renewing the security certification, and I made the mistake of installing from the repository and the default file structure it set up is hard/confusing to update or scale.

Also, I've been wanting to teach myself about Docker, and eventually Spring.

Maybe I'll make a temporary server for my site, and replace/reinstall Jetty "the right way". Will ponder, research a bit more before making my move.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct