Welcome! Log In Create A New Profile

Advanced

PHP SERVER_ADDR is wrong when using fastcgi & unix socket

Posted by somebi 
PHP SERVER_ADDR is wrong when using fastcgi & unix socket
July 23, 2011 11:23AM
location ~* ^\/ru\/video\/time-glass\/?$ {
server_name www.example.ru;
fastcgi_pass unix:/tmp/phpdaemon.fcgi.sock;
fastcgi_param APPNAME MyApp;

proxy_connect_timeout 60;
proxy_send_timeout 60;
proxy_read_timeout 120;

include fastcgi_params;
break;
}

fastcgi_params ofc contains default, unchanged settings and ofc there is:

fastcgi_param SERVER_ADDR $server_addr;

But it's returning local address 192.168.1.102 instead of external one, like usually does.

Can this be fixed anyhow? Maybe I'm just missing something or doing wrong?

Thanks :)
Re: PHP SERVER_ADDR is wrong when using fastcgi & unix socket
July 23, 2011 11:50AM
I have mistyped.

server_name www.example.ru;

is outside of location block ofc.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

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