My aim is to have configurable upstream, so I can use whatever php version I need per project / virtual host.
I tried:
upstream php {
server php7-fpm-alpine:9000;
}
server {
listen 80;
server_name somesite.com;
root /www/somesite.com;
include /etc/nginx/nginx-wp-common.conf;
}
nginx-wp-common.conf has fastcgi_pass php;
My setup works for 1 site, but once I start adding more virtual hosts for other domains nginx complains:
duplicate upstream "php"
As you can see my aim is modularity in choosing upstream and DRY principles.
fastcgi_pass php;to point to different upstream in each server?