Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

PHP-FPM 503 errors (EA4)

Discussion in 'EasyApache' started by divemasterza, Jan 7, 2016.

  1. divemasterza

    divemasterza Member

    Joined:
    Feb 2, 2013
    Messages:
    24
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    South Africa
    cPanel Access Level:
    Root Administrator
    Twitter:
  2. divemasterza

    divemasterza Member

    Joined:
    Feb 2, 2013
    Messages:
    24
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    South Africa
    cPanel Access Level:
    Root Administrator
    Twitter:
    I figured out the 503 issues ...

    Code:
    mkdir -p /home/$<user>/run/
    I ran this as root and obviously the owner was root and not the user ...

    A missing step also missing from the docs is the session.save_path (line 225 of the $<user>.conf file)

    I had to:
    • Change to value to /home/$<user>/tmp/session
    • mkdir -p /home/$<user>/tmp/session
    • chown $<user>:$<user> /home/$<user>/tmp/session
    I'll probably need also to set up a cron to cleanup this /session once a day

    I see a noticeable speed improvement for websites running FPM/FastCGI API especially relating to TTFB


    I hope that once EA4 is fully released in 11.56, we can look forward for a script to automate this :)

    Now figuring out the subdomains issue...
     
    #2 divemasterza, Jan 7, 2016
    Last edited: Jan 8, 2016
  3. swany

    swany Member

    Joined:
    Sep 21, 2011
    Messages:
    23
    Likes Received:
    1
    Trophy Points:
    53
    cPanel Access Level:
    Website Owner
  4. divemasterza

    divemasterza Member

    Joined:
    Feb 2, 2013
    Messages:
    24
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    South Africa
    cPanel Access Level:
    Root Administrator
    Twitter:
    Actually yes :)

    let say the subdomain is --> sub.example.com

    create the following two directories:
    Code:
    mkdir -p /etc/apache2/conf.d/userdata/std/2_4/$<user>/sub.example.com
    mkdir -p /etc/apache2/conf.d/userdata/ssl/2_4/$<user>/sub.example.com
    place an fpm.conf in each of these:

    Code:
    <IfModule proxy_fcgi_module>
    ProxyPassMatch "^/(.*\.php(/.*)?)$" "unix:/home/$<user>/run/php56-fpm.sock|fcgi://127.0.0.1/home/$<user>/public_html/sub"
    DirectoryIndex index.php
    </IfModule>
    rebuild http conf and restart
    Code:
    /scripts/rebuildhttpdconf; /scripts/restartsrv_httpd
    To test:

    Code:
    echo "<?php phpinfo(); ?>" > /home/$<user>/public_html/sub/info.php
    Look at the output in your browser it should say FPM/FastCGI in the server API
     
    swany likes this.
  5. swany

    swany Member

    Joined:
    Sep 21, 2011
    Messages:
    23
    Likes Received:
    1
    Trophy Points:
    53
    cPanel Access Level:
    Website Owner
    Daniel Gheorghe likes this.
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,903
    Likes Received:
    1,814
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    I am happy to see the initial issues were resolved. Thank you for updating us with the outcome.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice