Typically, you may want to have the ability to alexhost.com have PHP eight.1 because the default, but allow PHP 7.four for a specific site. Whereas not required, it’s also a good idea to install the repository for the Apache2 model Ondřej provides. Ondřej has been maintaining these official PPAs for Debian since PHP 5, so I extremely suggest supporting his work. In this part, you’ll replace your website config to be positive that it’ll use right version of php.

- In the above code snippet, we’re simply creating a default configuration of our apache server.
- Match the extensions to what each utility really requires.
- The Nginx net server is packages can be found within the official Ubuntu repository.
- Apache itself hundreds the PHP interpreter immediately by way of modules (such as mod_php), but just one PHP version may be enabled at a time this way.
Home Backend Development PHP Tutorial Configuration information for a quantity of PHP variations under Apache Digital Host The Apache internet server uses virtual hosts to manage a number of domains on a single instance.
This ensures the right PHP model is used in your internet purposes. If you have multiple PHP variations installed, you’ll be able to bulk-install specific extensions for all of them at once. This will record all variations and suitable modules in the Remi repository. This information explains the means to configure A Quantity Of PHP Versions in Webmin/Virtualmin
Tips On How To Find And Edit Phpini On Linux And Home Windows (apache, Nginx, Php-fpm)
At this point, you’ve configured two websites to run two different versions of PHP. Now that you have configured Apache to serve each site, you will check them to make sure the proper PHP versions are operating. With the stipulations accomplished, you’ll now set up PHP variations 7.2 and seven.3, as properly as PHP-FPM and several further extensions. This is beneficial because completely different functions might require completely different versions of PHP, but some server stacks, like a frequently configured LAMP stack, can only manage one. Together, you can use Apache and PHP-FPM to host a number of PHP web-applications, every utilizing a different model of PHP, all on the identical server, and all at the same time.
