location ~ ^/php55/.*.(php|php5)$ {这样就实现了版本的不同的目录运行不同的php版本了
fastcgi_pass unix:/dev/shm/php55-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ ^/php54/.*.(php|php5)$ {
fastcgi_pass unix:/dev/shm/php54-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ ^/php72/.*.(php|php5)$ {
fastcgi_pass unix:/dev/shm/php72-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ ^/php74/.*.(php|php5)$ {
fastcgi_pass unix:/dev/shm/php74-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
网友回复