jack.wang ysh
March 18, 2011 09:06AM
I have a problem when use upstream,my config is like this(nginx
version:0.8.54):

upstream www.a.com {
server 10.249.200.76:9000;
server 10.249.200.76:9001;
}

server{

.....

location ~ \.php$ {
root html;
fastcgi_pass www.a.com;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/$host
/$fastcgi_script_name;
include fastcgi_params;
}
}

and then can success to visit www.a.com;

but when "fastcgi_pass www.a.com;" relace by
"fastcgi_pass $host;", visit www.a.com is failed.

I don't know why? can somebody know?

new config like this:

upstream www.a.com {
server 10.249.200.76:9000;
server 10.249.200.76:9001;
}

server{

.....

location ~ \.php$ {
root html;
fastcgi_pass $host;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/$host
/$fastcgi_script_name;
include fastcgi_params;
}
}

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

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

upstream with fastcgi_pass

jack.wang ysh March 18, 2011 09:06AM

Re: upstream with fastcgi_pass

jack.wang ysh March 20, 2011 07:04AM

Re: upstream with fastcgi_pass

Splitice March 20, 2011 12:36PM

Re: upstream with fastcgi_pass

vt March 21, 2011 04:58AM

Re: upstream with fastcgi_pass

msingla April 02, 2011 10:11PM

Re: upstream with fastcgi_pass

msingla April 02, 2011 10:14PM

Re: upstream with fastcgi_pass

msingla April 03, 2011 03:22AM

Re: upstream with fastcgi_pass

jack.wang ysh April 07, 2011 11:28PM

Re: upstream with fastcgi_pass

msingla April 11, 2011 01:34PM

Re: upstream with fastcgi_pass

Igor Sysoev April 11, 2011 01:44PM

Re: upstream with fastcgi_pass

msingla April 11, 2011 04:45PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 301
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