I have ubuntu 18.04 with php 8.1.6 needed for Laravel9 system but want IspConfig also

Discussion in 'Installation/Configuration' started by ralphot, Jun 9, 2022.

  1. till

    till Super Moderator Staff Member ISPConfig Developer

    Then you probably have not added them in ISPConfig yet as described in the tutorial, check back with the tutorial if you did not miss following chapter 2 which described how to add them in ISPConfig.
     
  2. ralphot

    ralphot Member

    Ok, I missed that. So now I have got php 8.0 in the web domain page for Php Version. But when trying to open the web site I got:
    Forbidden
    You don't have permission to access this resource.
    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Take a look into the error,log of the website, you can find it in the log folder of the site. One reason might be that the files of the website are owned by the wrong user, all files and folders must be owned by the webID user and clientID group of the site.
     
  4. ralphot

    ralphot Member

    I can't see anything odd in apache2 error log or syslog and all files are the same, nothing is changed. If I do this:
    <FilesMatch \.php$>
    SetHandler "proxy:unix:/run/php/php8.0-fpm.sock|fcgi://localhost"
    </FilesMatch>
    again in the vhost file the site works ok. The problem came up after adding a new php version in ispconfig. And I wonder is
    Path to the PHP FastCGI binary: php-cgi8.0 in the tutorial really a path?? I don't understand that. The others looks like paths
     
    Last edited: Jun 18, 2022
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    In the website settings, select php-fpm as php mode and not fastcgi. FastCGI is a legacy mode and should not be used anymore.
    Then post the error that occurs in the error.log of the website (/var/www/yourdomain.tld/log/error.log) when you access the site.
    And post the result of:

    ls -la /var/www/yourdomain.tld/web/
     
  6. ralphot

    ralphot Member

    I found a wrong setting in my vhost file so now the error in the browser is:
    Service Unavailable
    The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
    Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request.
    not:
    Forbidden
    You don't have permission to access this resource.
    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the requested infos.
     
  8. ralphot

    ralphot Member

    As I said the contents of the web is
    web3:client1 as they should. There is no errors. The error is now:
    The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
    Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request.
    instead of forbidden. This becaouse I had a wrong setting, you see in my web I have to set .../web/public for Laravel
     
  9. ralphot

    ralphot Member

    as you wish:
    drwx--x--x 15 web3 client1 4096 jun 17 14:58 ./
    drwxr-xr-x 11 root root 4096 jun 16 12:04 ../
    drwxr-xr-x 13 web3 client1 4096 jun 16 12:25 app/
    -rw-r--r-- 1 web3 client1 1646 jun 16 12:25 artisan
    drwxr-xr-x 3 web3 client1 4096 jun 16 12:25 bootstrap/
    -rw-r--r-- 1 web3 client1 1121 jun 16 12:25 buildspec.yml
    -rw-r--r-- 1 web3 client1 2408 jun 16 12:25 composer.json
    -rw-r--r-- 1 web3 client1 420293 jun 17 14:27 composer.lock
    -rwxr-xr-x 1 web3 client1 2719975 jun 16 15:04 composer.phar*
    drwxr-xr-x 3 web3 client1 4096 jun 16 12:25 config/
    drwxr-xr-x 5 web3 client1 4096 jun 16 12:25 database/
    -rw-r--r-- 1 web3 client1 8196 jun 16 12:25 .DS_Store
    -rw-r--r-- 1 web3 client1 1208 jun 16 20:27 .env
    drwxr-xr-x 2 web3 client1 4096 jun 17 13:14 error/
    drwxr-xr-x 8 web3 client1 4096 jun 16 12:25 .git/
    rw-r--r-- 1 web3 client1 19 jun 16 12:25 .gitignore
    -rwxr-xr-x 1 web3 client1 263 jun 16 12:25 install*
    -rw-r--r-- 1 web3 client1 586 jun 16 12:25 package.json
    -rw-r--r-- 1 web3 client1 1697 jun 16 12:25 .php_cs.cache
    -rw-r--r-- 1 web3 client1 1198 jun 16 12:25 phpunit.xml
    drwxr-xr-x 9 web3 client1 4096 jun 18 12:42 public/
    -rw-r--r-- 1 web3 client1 2702 jun 16 12:25 readme.md
    drwxr-xr-x 6 web3 client1 4096 jun 16 12:25 resources/
    -rw-r--r-- 1 web3 client1 1024 jun 16 12:25 .rnd
    drwxr-xr-x 2 web3 client1 4096 jun 16 12:25 routes/
    -rwxr-xr-x 1 web3 client1 52 jun 16 12:25 run*
    -rw-r--r-- 1 web3 client1 234 jun 16 12:25 run.ps1
    -rw-r--r-- 1 web3 client1 563 jun 16 12:25 server.php
    drwxr-xr-x 2 web3 client1 4096 jun 18 14:08 stats/
    drwxrwxrwx 6 web3 client1 4096 jun 16 15:16 storage/
    drwxr-xr-x 5 web3 client1 4096 jun 16 12:25 tests/
    -rw-r--r-- 1 web3 client1 8492 jun 16 12:25 UPPGRADERINGAR.md
    -rw-r--r-- 1 web3 client1 549 jun 16 12:25 webpack.mix.js
    drwxr-xr-x 69 web3 client1 4096 jun 17 14:27 vendor/

    There is nothing wrong here!
     
  10. ralphot

    ralphot Member

    error log:
    [Sat Jun 18 14:20:06.308699 2022] [proxy:error] [pid 73916] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/lib/php7.4-fpm/web3.sock (*:80) failed

    [Sat Jun 18 14:20:06.308742 2022] [proxy_fcgi:error] [pid 73916] [client 127.0.0.1:41152] AH01079: failed to make connection to backend: httpd-UDS

    and getting this:
    Service Unavailable
    The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
    Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request.
     
  11. ralphot

    ralphot Member

    Ispconfig setting
     

    Attached Files:

  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, the file permissions are ok and the website settings are fine too. please post a screenshot of the php-fpm details of the PHP 8 version from system > PHP versions.
     
  13. ralphot

    ralphot Member

    Here is the dump
     

    Attached Files:

  14. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I think when @till wrote
    he wanted you to post a screenshot of ISPConfig Panel, the PHP settings: ISPConfit Panel | System | Additional PHP Versions | PHP-FPM Settings, for the PHP versions you have installed.
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    @Taleman: Yes, that#s the info that I had in mind.

    The question is, why was the php8-fpm process not able to create the socket one reason might be that it could not be restarted or the config directory is wrong due to wrong settings in the area I requested the screenshot from. Another possibility is that php8.0-fpm was restarted via /etc/init.d script manually which causes restarts via systems to fail so changes in config can not be picked up.
     
  16. ralphot

    ralphot Member

    Ok, first, I have these settings in ispconfig: FastCGISettings: php-cgi8.0 and /etc/php8.0/cgi/php.ini
    PHP FPM Settings: php8.0-fpm and /etc/php8.0/fpm/php.ini and /etc/php8.0/fpm/pool.d

    Are they OK?
    Path to the PHP FastCGI binary: php-cgi8.0
    Don't understand how php-cgi8.0 can be a path?? Should it not be /etc/php-cgi8.0 ?
    The forth PHP-FPM socket directory I don't know what to do with.
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    They are not ok. Please correct them to match the ones from the tutorial:

    Code:
    Path to the PHP-FPM init script: php8.0-fpm
    Path to the php.ini directory: /etc/php/8.0/fpm/
    Path to the PHP-FPM pool directory: /etc/php/8.0/fpm/pool.d
    Then go to the website, select a different PHP version, press save, then select PHP 8 again, press save, and wait for a minute.

    No, binaries are not in /etc on Linux systems. This is not related to your current issue as it not related to php-fom.
     
  18. ralphot

    ralphot Member

    Ok, corrected that. Same result, Service unavailable.
    From syslog:
    Jun 20 12:10:45 boss2020 systemd[1]: Started The Apache HTTP Server.
    Jun 20 12:11:01 boss2020 CRON[222779]: (root) CMD (/usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done)
    Jun 20 12:11:01 boss2020 CRON[222778]: (root) CMD (/usr/local/ispconfig/server/server.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done)
    Jun 20 12:12:01 boss2020 CRON[222794]: (root) CMD (/usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done)
    Jun 20 12:12:01 boss2020 CRON[222795]: (root) CMD (/usr/local/ispconfig/server/server.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done)
    Jun 20 12:13:01 boss2020 CRON[222810]: (root) CMD (/usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done)
    Jun 20 12:13:01 boss2020 CRON[222811]: (root) CMD (/usr/local/ispconfig/server/server.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done)
    Jun 20 12:13:15 boss2020 systemd[1]: Started ntp-systemd-netif.service.
    Jun 20 12:13:15 boss2020 systemd[1]: ntp-systemd-netif.service: Succeeded.
    Jun 20 12:13:22 boss2020 ddclient[922]: WARNING: file /var/cache/ddclient/ddclient.cache, line 3: Invalid Value for keyword 'ip' = ''
    Jun 20 12:13:23 boss2020 ddclient[922]: FAILED: updating EOF: nohost: The hostname specified does not exist in the database
    Jun 20 12:14:01 boss2020 CRON[222847]: (root) CMD (/usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done)
    Jun 20 12:14:01 boss2020 CRON[222846]: (root) CMD (/usr/local/ispconfig/server/server.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done)
    Jun 20 12:15:01 boss2020 CRON[222865]: (root) CMD (/usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done)
    Jun 20 12:15:01 boss2020 CRON[222866]: (getmail) CMD (/usr/local/bin/run-getmail.sh > /dev/null 2>> /dev/null)
    Jun 20 12:15:01 boss2020 CRON[222867]: (root) CMD (/usr/local/ispconfig/server/server.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done)
     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post a screenshot of the php-fpm settings of the PHP 8 version so I can check if the settings are really ok now.
    Then run this command as root and post the result:

    ls -la /etc/php/8.0/fpm/pool.d/

    finally, post the error that you get in the error.log of the website now. The syslog does not contain relevant information for this issue.
     
  20. ralphot

    ralphot Member

    ls -la /etc/php/8.0/fpm/pool.d/:
    drwxr-xr-x 2 root root 4096 jun 18 13:52 .
    drwxr-xr-x 4 root root 4096 jun 18 13:23 ..
    -rw-r--r-- 1 root root 20543 jun 10 15:11 www.conf
    root@boss2020:/etc/apache2/sites-available#

    website error.log
    [Mon Jun 20 12:35:06.599864 2022] [proxy_fcgi:error] [pid 222768] [client 127.0.0.1:50742] AH01079: failed to make connection to backend: httpd-UDS
    [Mon Jun 20 12:40:07.902401 2022] [proxy:error] [pid 222770] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/lib/php7.4-fpm/web3.sock (*:80) failed
    [Mon Jun 20 12:40:07.902445 2022] [proxy_fcgi:error] [pid 222770] [client 127.0.0.1:50760] AH01079: failed to make connection to backend: httpd-UDS
     
    Last edited: Jun 20, 2022

Share This Page