Score:0

Nginx 2 servers 1 port

cn flag

I know this can be done in Apache and I am still new to nginx but how do I based on the domain entering do I send it to a different server?

So I basically have 2 sites I just use for messing about with and I want to use nextcloud but this will have to be on a different domain

Example

Website1.com is on 192.168.1.4 Website2.com is on 192.168.1.4

Nextcloud.website1.com is on 192.168.1.5

The main set up is on 192.168.1.4 with all the server blocks and it works well and is so fast with the SSD powering everything.

I am guessing when the request comes through for next loud.website1.com it hits 192.168.1.4 and the. The config sends that domain to 192.168.1.5 nginx server block.

I just cannot find any examples on hope to do this and I am pretty stuck.

Hope your all well

Riddle

digijay avatar
mx flag
_"have 2 sites I just use for messing about with"_ Home and end-user computing questions may be asked on Super User
Riddleuk avatar
cn flag
Ok I think I get it. Using the block in the comment.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.