Welcome! Log In Create A New Profile

Advanced

Re: Upstream setup with proxy and fastcgi?

Francis Daly
April 23, 2011 06:48AM
On Fri, Apr 22, 2011 at 05:02:56AM -0400, TECK wrote:

Hi there,

> Ok, some updates on the testing. Using the configuration listed below
> does allow me to display index.php, but not index.html:

In your setup, when you access http://publicip/file.php, you want the
request to go to nginx, and then have nginx talk to one of the fastcgi
servers to get the response.

You report that this is working.

When you access http://publicip/file.html, you want the request to go
to nginx, and then what?

Do you want this nginx to serve /var/www/html/file.html from its
filesystem?; or do you want this nginx to talk to one of the other backend
web servers to let one of them provide the file from their filesystem?;
or something else?

> location / {
> proxy_pass http://backend;
> }
>
> location ~ \.php$ {
> fastcgi_pass fastcgi;
> include fastcgi.conf;
> }

> I tried to use only one server as main entrance but the load is going
> very high, once I run siege on it.
> How would I enable support for regular html files in the above
> configuration?

If you want nginx to serve the file itself, get rid of the "proxy_pass"
line.

If you want a backend server to handle it, this should already be
working. You report that it isn't, so check the logs of nginx, and of
the backend servers, to see if you can see where it fails.

(If that isn't enough to solve this, the in the reply, please include
what you do see instead of the content of /var/www/html/file.html when
you make the request. The http status code is probably significant.)

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: 285
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