nginx php fpm多实例配置
server {listen80;
server_name nodeA.localhost;
index index.php index.html;
root/WEB ROOT PATH/nodeA/;
location~ \.php$
{
fastcgi_pass unix:/tmp/php-cgi-nodeA.sock;
fastcgi_index index.php;
include fastcgi.conf;
expires off;
}
location ~ ^.+\.(swf|spg|css|xml|js|jpg|gif|png|mp3)$
{
expires 72h;
}
}
server
{
listen 80;
server_name nodeB.localhost;
index index.php index.html;
root/WEB ROOT PATH/nodeB/;
location~ \.php$
{
fastcgi_pass unix:/tmp/php-cgi-nodeB.sock;
fastcgi_index index.php;
include fastcgi.conf;
expires off;
}
location ~ ^.+\.(swf|spg|css|xml|js|jpg|gif|png|mp3)$
{
expires 72h;
}
}
页:
[1]