This repository provides a set of configuration files and a script to set up a PHP, Apache, and MySQL server in Termux.
config.inc.php
: Configuration file for database connection.httpd-vhosts.conf
: Configuration file for setting up virtual hosts in Apache.httpd.conf
: Main configuration file for Apache.index.php
: Basic PHP script to test the server setup.setup-server.sh
: Shell script to automate the setup process.
Termux App
- download Termux here.
- install git
pkg install git -y
- clone the script
git clone https://github.com/christiangarcia0311/termux-php-server
- go to the folder directory
cd termux-php-server
- Make the script executable by running
sh setup-server.sh
Initialize and start mysql
mysqld --skip-grant-tables
Start apache server
apachectl start
start mysql
mysql -u $(whoami)
Terminate running mysql
killall mysqld
Stop apache server
apachectl stop
localhost in web browser
localhost:8080
phpmyadmin in web browser
0.0.0.0:8080
For issues, please open an issue on GitHub.