Score:0

What is this NGINX location for PHP FPM fastcgi_pass 127.0.0.1:9000 really doing?

cn flag

What is this NGINX location for PHP FPM fastcgi_pass 127.0.0.1:9000 really doing?

Here's my locations and I have no errors, but I'd rather fully understand that line.

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ 
    {
    include snippets/fastcgi-php.conf;
    # With php7.0-cgi alone:
    # With php7.0-fpm:
    #fastcgi_pass 127.0.0.1:9000; #What is this doing?
    fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    }
Score:0
cn flag

fastcgi_pass 127.0.0.1:9000; is a commented line, it does nothing. You can uncomment it and comment fastcgi_pass unix:/run/php/php7.0-fpm.sock; to connect to php-fpm using tcp instead of unix socket. You will probably need to reconfigure php-fpm as well to do that.

cn flag
Thanks Sergey, I was just pasting it - but what does the line do? (if uncommented out)? Does it send local machine webcalls to port 9000? (IE things that wouldn't work from browser outside the local console? Just the basic of what that line 'would do'?
Sergey Kozharinov avatar
cn flag
No, webcalls are processed by nginx. Is would only make nginx <-> php-fpm communication happen though port 9000.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.