M
M
Maxim Grechushnikov2015-07-05 12:01:27
Nginx
Maxim Grechushnikov, 2015-07-05 12:01:27

How to parallelize two servers with websites?

there is a server, nginx + php5-fpm
because the load on one of the sites began to grow, we came to the conclusion that it was necessary to move the loaded site to a separate instance. Here is the task. Now there are two servers. on one there are several sites, on the second one is loaded. Could you poke your nose at what and where to read in order to set up the operation of these two servers?
If there was Apache on the backend, I would set up both on one and the other machine on the server and would indicate the root document to everyone, and nginx would simply proxy. But in my case, php5-fpm is configured and there is no Apache, and somehow there are no thoughts on how to tell php5-fpm where to get the files. In the virtual host settings, will the document root seem to refer to local files? Or to remote ones?
RESOLVED!
Turns out I was heading in the wrong direction. As a result, I configured proxy_pass and it all worked

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Valery Ryaboshapko, 2015-07-05
@maxyc_webber

somehow there are no thoughts how to tell php5-fpm where to get files

If you are talking about static (pictures, styles, scripts), then nginx should do this, not php-fpm. If you have paths to scripts, then in {Fast}GCI there are variables SCRIPT_NAME and SCRIPT_FILENAME for this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question