Apache2-PHP


Badge

Apache2-PHP Installer

Shell Script Ubuntu License: MIT Status

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.


🚀 Features


📦 Installation

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

🖥️ Verification

After installation, open in your browser:

http://your_server_ip/info.php

You should see the PHP info page confirming Apache + PHP integration.


🔄 Uninstallation

To remove Apache2 and PHP completely:

./uninstall.sh

This stops services, purges packages, and deletes configuration files.


📜 Usage

  1. Save each script as install.sh and uninstall.sh.
  2. Make them executable:
    chmod +x install.sh uninstall.sh
    
  3. Run with:
    ./install.sh
    ./uninstall.sh
    

👤 Author

Md. Sohag Rana
GitHub: Sohag1192
📱 Telegram: @sohag1192
🌍 Location: Bangladesh