Lanka Developers Community

    Lanka Developers

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Shop
    1. Home
    2. Tags
    3. server
    Log in to post
    • All categories
    • Chathunz

      INSIDE OF COMPUTER SERVER
      General Discussion • server linux hardware system engineer • • Chathunz

      3
      1
      Votes
      3
      Posts
      411
      Views

      Chathunz

      thanks bro

    • lkdev

      Nginx: connect() failed (111: Connection refused) while connecting to upstream
      Linux • nginx php server ubuntu • • lkdev

      7
      0
      Votes
      7
      Posts
      6040
      Views

      crxssrazr93

      @lkdev said in Nginx: connect() failed (111: Connection refused) while connecting to upstream:

      @crxssrazr93 said in Nginx: connect() failed (111: Connection refused) while connecting to upstream:

      @lkdev

      Make sure php-fpm is already running on the background...

      Then, change your listen 80; to listen 127.0.0.1; .

      @ciaompe said in Nginx: connect() failed (111: Connection refused) while connecting to upstream:

      Simply, open the following path to your php5-fpm (if you php 7 then open php 7 fpm)

      Php 5

      sudo nano /etc/php5/fpm/pool.d/www.conf

      Php 7

      sudo nano /etc/php/7.2/fpm/pool.d/www.conf

      Then find this line and uncomment it:

      listen.allowed_clients = 127.0.0.1

      Also comment below line

      Php 5

      ;listen = /var/run/php5-fpm.sock

      Php 7

      ;listen = /run/php/php7.2-fpm.sock

      and add

      listen = 9000 after you make the modifications, all you need to restart or reload both Nginx and Php fpm

      Php 5

      sudo service php5-fpm restart

      Php 7

      sudo service php7.2-fpm restart

      Nginx

      sudo service nginx restart

      Guys this works. thanks aganin and lankadevelopers thank you very much

      Anytime mate xD

    • 1 / 1