Welcome! Log In Create A New Profile

Advanced

Need help to configure nginx-varnish-php s

Rajesh Gangula
February 03, 2015 05:28PM
Hi All,

I am newbie to nginx and would need help configuring
nginx-varnish-php-fpm setup to allow

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

--
Posted via http://www.ruby-forum.com/.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Need help to configure nginx-varnish-php s

Rajesh Gangula February 03, 2015 05:28PM

Re: Need help to configure nginx-varnish-php s

GreenGecko February 03, 2015 06:22PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 147
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready