changed PHP, now phpinfo() gives 503 error

Discussion in 'Installation/Configuration' started by manarak, Mar 15, 2022.

  1. manarak

    manarak Member

    I have upgraded a server from ubuntu 18.04 to 20.04 today, and also upgraded ispconfig to the latest version.

    somehow in the process, HHVM appeared and was set as PHP version for the default website on the webserver, so I switched it back to php-FPM, restarted apache2 and now phpinfo() gives error 503.

    I don't know how this HHVM thing got installed and why it was set as default. I had never heard of it before.
    I removed and purged HHVM from the server and ran update and upgrade.

    Now I get
    how to fix this?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    An ISPConfig update does not change the config of websites at all, so the change to HHVM must be caused by something else. Current ISPConfig versions do not even support HHVM anymore, it has been removed a few years ago. This website is still set to HHVM PHP Mode for whatever reason. Go to the website settings, select php-fpm as PHP modeand press save to change the PHP mode of that site. If this does not work, use debug mode to find out why.
     
  3. manarak

    manarak Member

    yes, I did that already, I set it to FPM already, but the above error keeps coming
    can you please clarify about debug mode?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    manarak likes this.
  5. manarak

    manarak Member

    ok, there was no .err file in that directory

    running the task yields:
     
  6. manarak

    manarak Member

    the 000-default.conf file though contains SetHandler hhvm-fcgi
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    This file is not from ISPConfig.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    To debug an action, you must do that action. In your case, switch the site to php-fpm (or if it#s there already, switch it to php-fcgi mode, press save, and switch back to php-fpm and press save.
     
    manarak likes this.
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    You might also want to go through the perfect server guide for Ubuntu 20.04 and run each apt-get install command to ensure that all new required packages are installed.
     
  10. manarak

    manarak Member

    I copied over a .conf file from a newly created dummy host, now it's got "SetHandler none"

    why?
     
  11. manarak

    manarak Member

    ok, thanks, I will try that
     
  12. manarak

    manarak Member

    I will try to redo all the steps of perfect server guide for Ubuntu 20.04
     
  13. manarak

    manarak Member

    I also see a problem with the above calling php7.2 but I configured php7.4
     
  14. manarak

    manarak Member

    ok, I did the perfect server install and re-ran update:

     
  15. manarak

    manarak Member

    or has something changed in how to serve the default site?

    It was as easy as replacing 000-default.conf with dummy.com.vhost or am I mistaken?
     
  16. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Nothing has changed in how the web server chooses the default site.
     
  17. manarak

    manarak Member

    can you please explain how the web server chooses the default site?
     
  18. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    I believe lexicographically based on file name, so the default on your system would be:
    Code:
    ls -1 /etc/apache2/sites-enabled/ | head -1
     
  19. manarak

    manarak Member

    that would be @000-apps.vhost
    so a lot has changed, I don't remember that file from 2012

    so if I have created a "website" in the ISPconfig3 interface and a @100.dummy.com.vhost has been created in /etc/apache2/sites-enabled/
    how do I make dummy.com the default website on that server?
    (it's something I did before, I mean in 2012, but it seems a little different today)

    should this method still work:
    https://www.howtoforge.com/community/threads/2-essential-add-ons-for-ispconfig3.57539/#post-283623
    ??
     
    Last edited: Mar 15, 2022
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    Nothing has changed since 2012, Apache works still in the same way.

    I guess @Jesse Norell command is a bit oversimplified as it shows you the first file in alphabetical order, but the vhost in that file must also listen on the right IP and port (which the command can't check). The apps vhost listens on port 8081 and not port 80 and 443, so the apps vhost is not the default vhost of your system.

    To create a default vhost, add a new website in ISPConfig and use e.g. 000default.tld as domain name. But you must take care that ou also enable SSL and create a self-signed SSL cert for it. and all websites on your server incl. that default vhost must use the same IP (or preferably all use +). never mix IP and *.
     

Share This Page