Can I have web directories on different linodes?

Hi

let's say I have two linodes. What I want is that

server.com/linode1 will be served by ngix of linode1 and

server.com/lonode2 will be served by ngix of linode2

is that possible? Is that possible without any redirection?

Thank you

R.

6 Replies

Not completely without redirection, no.

One way to solve it would be to have one of the linodes serve the request for the whole domain name itself, but it will then need to direct requests to one of the directories to the other linode, either by redirection to another hostname (pointing to the IP address of the other server), or by serving as a proxy between the client and the other linode for that particular directory. However, the latter setup can be difficult to achieve without intimate knowledge of nginx configuration.

@NeonNero:

Not completely without redirection, no.

I thought it would be the case.

But I can have this without redirection, right?

linode1.server.com and linode2.server.com

R.

Yes, you would point linode1.server.com at one IP address, and linode2.server.com at another.

@Vance:

Yes, you would point linode1.server.com at one IP address, and linode2.server.com at another.

good. Thank you guys for your help. R.

With a haproxy frontend you can do this. You can also serve php from a different server than static content (or a pool of server backends).

@bd3521:

With a haproxy frontend you can do this. You can also serve php from a different server than static content (or a pool of server backends).

I wanted to know if there is any possible way to achieve this without a "middle" man…. So I use subdomains instead. R

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