A simple shell script set for Ubuntu/Debian to install and uninstall Apache2 + PHP with common modules. Includes configuration tweaks to allow serving all file types and a test PHP file for verification.
info.php)Clone the repository and run the installer:
apt update -y
apt install git -y
git clone https://github.com/sohag1192/Apache2-PHP.git
cd Apache2-PHP
chmod +x install.sh uninstall.sh
./install.sh
After installation, open in your browser:
http://your_server_ip/info.php
You should see the PHP info page confirming Apache + PHP integration.
To remove Apache2 and PHP completely:
./uninstall.sh
This stops services, purges packages, and deletes configuration files.
install.sh and uninstall.sh.chmod +x install.sh uninstall.sh
./install.sh
./uninstall.sh
Md. Sohag Rana
GitHub: Sohag1192
📱 Telegram: @sohag1192
🌍 Location: Bangladesh