Multiple Domains One Linode Instance

Apologies ahead of time. I have searched the linode docs and repeated many types of changes based on what I have read.

I have one linode vm which has its own ip address. I am running ubuntu 14 and nginx. I have two domain names domain1.com and domain2.com

I would like the linode vm to serve both domain names. One of the domain names will just be static html files. The other will/is a python/flask web application. I can access the python/flask web application directly by browsing to http://ip.address:8000.

I may add more web apps in the future. Can someone point me in the right direction for getting domain names correctly mapped to each app using nginx?

I don't know what mistakes I am making so exact steps would be beneficial.

Thanks in advance!

1 Reply

What you are looking for are called "server blocks" in nginx and Apache calls them "virtual hosts"

Example one for instance: ~~[https://www.nginx.com/resources/wiki/start/topics/examples/serverblocks/" target="blank">](https://www.nginx.com/resources/wiki/st … er_blocks/">https://www.nginx.com/resources/wiki/start/topics/examples/server_blocks/](

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