Everthing is still under construction.
Project purpose is to help with creating local Apache web server with PHP and MariaDB database.
These instructions will get you a copy of the project up and running on your local machine for development purposes.
What things you need to install the software and how to install them
- Windows Subsystem for Linux
- Debian linux from Microsoft Store
A step by step how to install WDL
Update packages list, upgrade packages and install git
sudo apt update && sudo apt upgrade -y && sudo apt install -y git
Then clone repo
cd ~ && git clone https://github.com/Niyabi/WDL.git
Then let's run script which will install required packages and configure them. At The end phpMyAdmin installer will ask few things. When asked if to configure database check Yes, when asked about webserver check (using Spacebar) apache2.
sudo sh ~/WDL/wdl.sh
To start web server run start.sh.
sudo sh ~/WDL/start.sh
To stop web server run stop.sh.
sudo sh ~/WDL/stop.sh
To create virtual host run virtual-host.sh. You will be asked for project name and path to project, eg myproject in /mnt/c/Users/YourUserName/Documents/myproject so your URL will be myproject.local.
sudo sh ~/WDL/virtual-host.sh
To connect to virtual host open Notepad as administrator, open hosts file in C:\Windows\System32\drivers\etc. Type localhost IP adress (127.0.0.1) and project URL e.g. 127.0.0.1 myproject.local. Save and close file.
To access database use use HeidiSQL or phpMyAdmin (http://localhost/phpmyadmin/). To login to phpMyAdmin (if not asked for username during phpMyAdmin installation) username will be phpmyadmin and password the one you set during installation.
This configuration allows use of mutiple version of PHP at the same time. To install different, than 7.2, version of PHP use this command:
sudo apt install -y phpX.Y phpX.Y-fpm
For example:
sudo apt install -y php7.0 php7.0-fpm
To install PHP extension run:
sudo apt install -y phpX.Y-ext
For example:
sudo apt install -y php7.0-pdo
In virtual host config file (found here: /etc/apache2/sites-available/) you have to change php-fpm sock in this line:
SetHandler "proxy:unix:/var/run/php/php7.2-fpm.sock|fcgi://localhost/"
For example:
SetHandler "proxy:unix:/var/run/php/php7.0-fpm.sock|fcgi://localhost/"
- User able to choose PHP version
- Additional PHP version installer
- Exception protection
- Apache optimization
- MariaDB optimization
- PHP optimization
- Szymon Krawiec - Niyabi
This project is licensed under the GNU GPL v3 License - see the LICENSE.md file for details