Hi, Friends this tutorial for Install PHP Module for Apache on Ubuntu


Apache Web Server is among the extra dominant internet servers on the web. Most of these installations are working some type of PHP functions, whether or not Laravel, WordPress, or another customized utility.

Apache was initially used as a static internet server, internet hosting HTML  records data, for instance, immediately the consumer. Nonetheless, because of its help for modules, the online server capabilities have grown to run as a utility server as properly.

Out of the field, a default Apache2 internet server installation on Ubuntu 18.04, 18.10, 19.04, and 19.10 is not going to run a PHP application. The PHP module will not be included.

This tutorial will present you find out how to configure an Apache internet server for working PHP applications.

Installing Apache

To put in Apache in your Ubuntu server, run the next command.

sudo apt install apache2

Installing PHP

Install PHP is solely sufficient. It may Ben put in utilizing the Apt package deal supervisor from Ubuntu’s repositories.

PHP may also be installed from the supply, in the event you require a newer model. That process, sadly, is outside of the scope of this tutorial.

To put in PHP, run the next command:

sudo apt set up php

Further PHP modules might be put in with the language itself.

Install Apache PHP Module

The PHP module for Apache will not be bundled with Apache. As such, it has to be put in along with the Apache package deal.

sudo apt install libapache2-mod-php

As soon as put in the module should be enabled. We accomplish this utilizing the a2enmod command.

sudo a2enmod php 

Lastly, the Apache internet service requires a reboot earlier than the enabled mod can be loaded.

sudo systemctl restart apache2

How to configure IPV6 on Ubuntu

Categorized in:

Tagged in: