Different PHP version on subfolder

Discussion in 'Installation/Configuration' started by razor7, Jun 2, 2022.

  1. razor7

    razor7 Member

    Hi! can I have a version of PHP in the root folder of a domain and another php version in a subfolder of the same domain?

    /web <-- PHP 7.4
    /web/projectOne <-- PHP 8.0
    /web/projectTwo <-- PHP 8.1

  2. razor7

    razor7 Member

    Forgot to mention, I have multi PHP enabled and configured in ISPConfig
  3. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    ISPConfig does not support that. You might pull it off with very custom config. You might also be able to install two separate sites and reverse proxy the location of one project to the second site (eg. domain.tld/projectOne runs normally, domain.tld/projectTwo is a reverse proxy to a subdomain you create like projecttwo.domain.tld/projectTwo).
  4. razor7

    razor7 Member

    Thanks! not an issue at all, this is for a development project so I can easily add a new domain or subdomain and thats all, new independent /web folder and PHP version.

    Thanks anyway!
  5. ahrasis

    ahrasis Well-Known Member

    Only possible if you use subdomain with own vhost.
  6. razor7

    razor7 Member

    Thanks! that's what I wanted to avoid, and use something like cPanel .hteaccess php handler to have a different versions on a subfolders.
    It's a dev server anyway so going back and forward with PHP version is not an issue

Share This Page