Welcome! Log In Create A New Profile

Advanced

allowed_clients needs external ip

Posted by Schokobecher 
Schokobecher
allowed_clients needs external ip
April 17, 2010 04:06PM
I'm running nginx 0.8.35 with PHP 5.3.2.
The problem is that I have to set allowed_clients to the external IP
of my server, else I get the 502 Bad Gateway Error.

My default site of nginx:
http://pastebin.com/Ga5Vj5u3

My php5-fpm.conf:
http://pastebin.com/njhywXfy

the nginx error log gives me:
2010/04/17 14:36:19 [error] 26819#0: *1 upstream prematurely closed
connection while reading response header from upstream, client:
188.194.9.202, server: localhost, request: "GET /php.php HTTP/1.1",
upstream: "fastcgi://127.0.0.1:9000"$

Is it a problem/security risk to add the external IP?
If yes, how can I fix this problem?


--
Subscription settings: http://groups.google.com/group/highload-php-en/subscribe?hl=en
Jérôme Loyet
Re: allowed_clients needs external ip
April 18, 2010 05:32AM
2010/4/17 Schokobecher <schokobecher@googlemail.com>:
> I'm running nginx 0.8.35 with PHP 5.3.2.
> The problem is that I have to set allowed_clients to the external IP
> of my server, else I get the 502 Bad Gateway Error.
>
> My default site of nginx:
> http://pastebin.com/Ga5Vj5u3
>
> My php5-fpm.conf:
> http://pastebin.com/njhywXfy
>
> the nginx error log gives me:
> 2010/04/17 14:36:19 [error] 26819#0: *1 upstream prematurely closed
> connection while reading response header from upstream, client:
> 188.194.9.202, server: localhost, request: "GET /php.php HTTP/1.1",
> upstream: "fastcgi://127.0.0.1:9000"$
>
> Is it a problem/security risk to add the external IP?
> If yes, how can I fix this problem?

why do you have to set an external IP address ? nginx is requesting
127.0.0.1:9000 and fpm allows only clients from 127.0.0.1. It's good !

Do you have fpm log errors ?

Maybe it's just your PHP script which is broken


--
Subscription settings: http://groups.google.com/group/highload-php-en/subscribe?hl=en
Schokobecher
Re: allowed_clients needs external ip
April 19, 2010 04:26AM
"why do you have to set an external IP address ?"
That is what I want to know.
The fpm log doesn't show any errors.
I tested everything:
From a board software to a simple Hello World Program. If I enter the
external Ip in php5-fpm.conf everything is fine... else it fails.


--
Subscription settings: http://groups.google.com/group/highload-php-en/subscribe?hl=en
Sorry, only registered users may post in this forum.

Click here to login

Online Users

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