Answer the question
In order to leave comments, you need to log in
Nginx + fastCGI - how to install on two hosts?
Hello. I started to study the web, I ask for help.
There are two hosts. I want the first one to process statics, and the php code to be executed on the second one. I install nginx on the first one and proxy php requests to the second host. Question: only php or nginx+php must be installed on the second host to accept these requests from the first one and process them?
Answer the question
In order to leave comments, you need to log in
Just PHP is enough. All you have to do is run PHP-FPM on the second one and set fastcgi_pass to 127.0.0.1:9000 on the first one; - not the local IP, but the IP of the second server.
Only at the same time it is necessary to make access possible on the second server only from the IP of the first server.
If this is for educational purposes, study further. If for a production host - it is better to order the services of a system administrator, among other things, there are many features for a secure setup that are difficult to foresee.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question