There are two servers a B, a installation nginx, B install PHP, this time nginx and PHP how to configure?
Reply content:
There are two servers a B, a installation nginx, B install PHP, this time nginx and PHP how to configure?
The configuration is basically unchanged. Adjust the firewall, only the Nginx exposed to the outside network. The usual nginx sent to FPM address from 127.0.0.1 to B server address, in PHP-FPM set listen to B LAN address, listen.allowed_clients plus a LAN address is good.
Note that the site directory structure of the Nginx server and the PHP server needs to be consistent at this time.
root /usr/local/web/www/; location ~ .*\.(php|php5)?$ { #fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_pass 127.0.0.1:9000; ##你懂得 fastcgi_index index.php; include fcgi.conf;
Modify the fastcgi configuration parameters to
Poor performance without nginx+ (NGINX+PHP-FPM) fast
Borrow the place to ask,
Do you want to deploy the Web on both Nginx and PHP two machines? Code two machines?