L
L
Levani Ramazashvili2014-12-15 14:30:11
linux
Levani Ramazashvili, 2014-12-15 14:30:11

How to make a directory in Nginx that will take data from another server?

Hello.
There are two sites for example "example.com" and "drive.example.com" which are located on different servers
. You need to implement the following: when there is a request for the directory "example.com/drive" the web server should return data from "drive.example.com " so that the URL doesn't change.
Is it possible to implement this and if so, how?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
L
Little_CJIOH, 2014-12-15
@Little_CJIOH

proxy_pass you need
location /drive {
proxy_pass http://drive.example.com;
}

V
Vladimir Abramov, 2014-12-15
@kivsiak

Maybe.
nginx.com/resources/admin-guide/reverse-proxy

V
Valentin, 2014-12-15
@vvpoloskin

Perhaps - redirect, rewrite-rule, reverse-proxy, eventually alias to a remotely mounted file system.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question