Welcome! Log In Create A New Profile

Advanced

Re: Upstream setup with proxy and fastcgi?

Francis Daly
April 18, 2011 01:08PM
On Mon, Apr 18, 2011 at 12:30:00PM -0400, TECK wrote:

Hi there,

I've re-read the thread, and I'm not sure what you are trying to
do. Hopefully the following will be useful; if not, if you could include
a clear picture of what services should be running and how they should
interact, it might make it easier for the next person to offer help.

> In theory, all I have to do is this:
>
> location / {
> proxy_pass http://proxy;
> }

If your backend servers are nginx, each configured to talk to a fastcgi
server, then the above should be pretty much all you need.

> location ~ \.php$ {
> fastcgi_pass php;
> include fastcgi.conf;
> }

That will be useful if your frontend server (= load balancer) should
split the .php urls separately from the other urls.

> However, I have a script that is processed like that on a normal single
> server setup:
> location /forum/ {
> try_files $uri $uri/ /forum/data.php$args;
> }
>
> How would I make the try_files work with the load balancer scheme?

I think you've said that your front-end doesn't have files, so try_files
can't work.

Perhaps using

proxy_intercept_errors on;

with

error_page 404 = /forum/data.php$args;

inside the "location /" block would work in a similar way? (Although
it might need to be /forum/data.php?$args, for the php-using location
to match.)

Good luck with it,

f
--
Francis Daly francis@daoine.org

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

Upstream setup with proxy and fastcgi?

TECK April 14, 2011 02:15PM

Re: Upstream setup with proxy and fastcgi?

TECK April 16, 2011 06:49PM

Re: Upstream setup with proxy and fastcgi?

Igor Sysoev April 18, 2011 10:12AM

Re: Upstream setup with proxy and fastcgi?

TECK April 18, 2011 11:13AM

Re: Upstream setup with proxy and fastcgi?

TECK April 18, 2011 12:29PM

Re: Upstream setup with proxy and fastcgi?

Francis Daly April 18, 2011 01:08PM

Re: Upstream setup with proxy and fastcgi?

TECK April 18, 2011 01:45PM

Re: Upstream setup with proxy and fastcgi?

TECK April 18, 2011 02:25PM

Re: Upstream setup with proxy and fastcgi?

Igor Sysoev April 18, 2011 02:02PM

Re: Upstream setup with proxy and fastcgi?

TECK April 18, 2011 02:45PM

Re: Upstream setup with proxy and fastcgi?

Francis Daly April 18, 2011 03:04PM

Re: Upstream setup with proxy and fastcgi?

Igor Sysoev April 18, 2011 02:30PM

Re: Upstream setup with proxy and fastcgi?

Francis Daly April 18, 2011 02:36PM

Re: Upstream setup with proxy and fastcgi?

TECK April 18, 2011 03:11PM

Re: Upstream setup with proxy and fastcgi?

TECK April 22, 2011 05:02AM

Re: Upstream setup with proxy and fastcgi?

Francis Daly April 23, 2011 06:48AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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