Installing Apache and PHP 8.1 on Ubuntu 21.10 x64. This post covers creating an HTTP web server using Apache with the new PHP 8.1 version.
You will need sudo permissions for this.
Start by updating the package list with
sudo apt update
Once that has finished running, install apache2
sudo apt install apache2
Apache is the number one, open-sourced HTTP server and comes ready to use.
If you have UFW (firewall) running you will need to allow Apache through
sudo ufw allow 'Apache'
You can check Apache’s status with
sudo systemctl status apache2
This will tell you if Apache is running or not.
PHP version 8.1 was released November 25th 2021, as of this blog post the latest version is 8.1.1
You may need to install the independent software sources, this can be done with
sudo apt install software-properties-common
This is needed for the latest PHP versions repository
sudo add-apt-repository ppa:ondrej/php
sudo apt install php8.1 libapache2-mod-php8.1
Installing PHP 8.1 extensions is done in the following format:
sudo apt install php8.1-[extension_name]
An example with a few common extensions
sudo apt install php8.1-{curl,mysql,xml} Restart Apache
sudo systemctl restart apache2
Check and confirm the PHP version
php -v
A drained and empty Kennington reservoir images from a drone in early July 2024. The…
Merrimu Reservoir from drone. Click images to view larger.
Some early September spring shots from a bushwalk, It is still too early for wildflowers.
I recently needed to clone over a smaller NVMe to a 2TB SK Hynix Platinum…
If you ever needed a simple solution in Laravel to delete an entire directory and…
How to enforce only one user to register or be registered in a Laravel web…