Looking for a way to access PHP7-FPM in an LXC container and PHP5-FPM in an other while NGINX is installed on the host. The idea is to serve https://www.example.com/ with PHP7 and https://www.example.com/old/ with PHP5.
Here is my conf for NGINX:
location ~ /old/\.php$ {
try_files $uri =404;
fastcgi_intercept_errors on;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 192.168.0.10:9000;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_intercept_errors on;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 192.168.0.200:9000;
}
Extra: How can I share the PHP files to the LXC containers? Is NFS necessary?