Menu

new virtual server cant use php-fpm

2020-11-19
2020-11-19
  • Anders Yuran

    Anders Yuran - 2020-11-19

    I have Virtualmin on a vps with Ubuntu 18.04
    I have 2 domains installed
    The first domain rund a webshop without problem using php 7.2 fpm.
    Now we have cloned that webshop to a second domain on the same vps but I get an error message
    This virtual server is using the mod_php execution mode for PHP, such does not allow per-directory version selection.
    This result in a not working webshop, the page show the php code instead of the rendered page
    How fix this?

    This is the outcome when I recheck the configuration

    The following PHP versions are available : 7.2.34 (/usr/bin/php-cgi7.2), 7.4.12 (/usr/bin/php-cgi7.4), 7.4 (mod_php)
    The following PHP execution modes are available : mod_php cgi fcgid fpm
    The following PHP-FPM versions are available on this system : 7.2.3 (php7.2-fpm) 7.4.12 (php7.4-fpm)

     
  • Ilia

    Ilia - 2020-11-19

    Hi, Anders!

    I have found a bug here, where FPM service is not restarted for a source domain making it fail. We will fix it for Virtualmin 6.14.

    Meanwhile, you could restart FPM service manually for both domains.

    systemctl restart php7.2-fpm.service
    systemctl restart php7.4-fpm.service
    

    Now we have cloned that webshop to a second domain on the same vps but I get an error message This virtual server is using the mod_php execution mode for PHP, such does not allow per-directory version selection. This result in a not working webshop, the page show the php code instead of the rendered page. How fix this?

    Was the source domain set to use FPM mode? If so, cloned domain will also have FPM mode enabled. If it's not the case, you can go to Server Configuration > Website Options and change execution mode, which will re-write the configs and fix an issue for you.

    Let us know, if it have worked for you?

     
  • Anders Yuran

    Anders Yuran - 2020-11-19

    Hi!
    I did not find the clone possibility until after I just copied the website. But I found the second option and now it works as I want

    THANKS

     

Log in to post a comment.