Hi All,
I am newbie to nginx and would need help configuring
nginx-varnish-php-fpm setup to allow hitting specific php nodes for
troubleshooting
Our current setup.
Nginx Varnish running in same server
Php-fpm running on different server.
Varnish is configured to load balance between php-nodes.
We would like to find a way to access specific php-nodes on demand
instead of getting through the load balancer, is there a way we can do
that with the following setup. This is more of troubleshooting purpose
so we dont want to remove varnish load balancing.
I am thinking something like when the request to nginx comes as a
specific url it hits specific php node.
$ cat /etc/nginx/conf.d/upstreams.conf
upstream php-be {
server php-vip.prod…com:9001;
}
==================
location ~* .php$ {
add_header Access-Control-Allow-Origin “*”;
include fastcgi_params;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SERVER_PORT $forwarded_server_port;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param REMOTE_ADDR X.X.X.X;
fastcgi_param HTTPS $using_https;
fastcgi_pass php-be;
}
======================
Any help would be greatly appreciated.
Thanks
-Rajesh