sudo apt update
sudo apt install apache2 -y
sudo apt install php libapache2-mod-php php-mysql -y
sudo systemctl status apache2
This should show that Apache is running. You can also test Apache by opening a web browser and navigating to the server’s IP address. If Apache is working, you should see the default Apache page.
Now that Apache is installed, we need to deploy the PHP-based to-do list application to the web server.
scp -r ToPHP/* sibou@192.168.85.141:/home/sibou/ToPHP
ToPHP/* specifies the files to be transferred.
sibou@192.168.85.141:/home/sibou/ToPHP is the remote server’s user and destination directory.

ssh sibou@192.168.85.141
sudo mv /home/sibou/ToPHP /var/www/html/
/var/www/html/ is the default document root directory for Apache.
sudo chown -R www-data:www-data /var/www/html/ToPHP
sudo chmod -R 755 /var/www/html/ToPHP
chown -R www-data:www-data gives ownership of the files to the www-data user and group (which Apache uses).
chmod -R 755 ensures that files are readable and executable by the owner and others.
