Apache Php Windows 10



As we know the Windows Subsystem for Linux 2 has its own Linux Kernel which makes it run various kinds of open source programs efficiently. Therefore, here we are with a tutorial to learn how to install LAMP stack (Apache, MySQL, and PHP including PhpMyAdmin) on WSL 2.

LAMP stack which is also known as a Linux web server stack to run various web apps, CMS such as WordPress and more. Of course, if you are already using XAMPP on Windows 10, then there is a provision to change the default ports of Apache, PHP, and MySQL or MariaDB so that the LAMP on WSL 2 and one on XAMP can run together without interfering in each other’s services.

Why you should start using Apache web server or LAMP on WSL 2 instead of a Virtual machine?

The biggest reason to run the LAMP server on WSL 2 rather than using Virtual Machine on VirtualBox or VMware Player is the performance. As Windows Subsystem for Linux is tightly integrated into Windows 10 environment, thus the performance which we can get there will be much better than running some Linux VM. Furthermore, after the latest Windows update, now we can explore the Linux filesystem directly using the Windows explorer, even running of GUI applications on WSL 2 is possible.

Windows

Another thing is WSL uses the Windows localhost or the same IP address which the system has, thus it easy to access the created webserver and web apps using the system browser, without much hassle.

Configuring the Apache Web Server to Run PHP on Windows. Listed below is information on how to configure the Apache web server to run PHP programs on Windows machines.

WindowsInstall LAMP server on WSL 2 or 1- Windows 10 subsystem for Linux
Start Apache and MySQL services
Php

Install LAMP server on WSL 2 or 1- Windows 10 subsystem for Linux

The Apache project does not provide binaries or executable files for Windows. Instead, it offers source code to compile. If you are unable to do so, then the same page offers several binary distributions on the internet. In this case, we will use Apache Lounge. Php-7.3.1-Win32-VC15-x86.zip; Things I've already checked: Both Apache and PHP are compiled with the same version of C Redistributable Visual Studio; I'm using the Thread Safe version of PHP; The file php7apache24.dll is in the main PHP folder and I've copied it to the folder Apache24/modules; I've added the following lines to the httpd.conf. Configure IIS, Skype and other software (optional) If you have a Professional or Server version of.

The popular distribution available on Microsoft Store to download and use as WSL 1 or 2 is of course Ubuntu 18.04 or Ubuntu 20.04 LTS. You can choose any of them. However, before moving further make sure you already have installed WSL 1 to enable WSL 2. The steps given below will work for both versions.

Check out these two tutorials, if you haven’t had a Subsystem.

Run WSL Ubuntu 18.04 or 20.04 distro

Those are using it the first time, to run bash after installing, simply go to the Windows search box and type Ubuntu, as its icon appears, click that to run.

Update system

After starting the program first time, it will be a good idea first we update its repo and packages, for that run the following two commands:

sudo apt upgrade

Install Apache. MySQL and PHP – Lamp Server

Now, to install the Lamp server, we can use the below given single command on WSL Linux instead of issuing one by one for each service to get configured on the system.

The above command will show the packages are going to install for Apache, MySQL, and PHP, accept them and let the system install the same.

Start Apache and MySQL services

Once the installation is completed, start the Apache and MySQL service using the below commands:

Apache Download For Windows 10

Secure and start MySQL:

Apache Php Windows 10 32-bit

To check Apache is running perfectly, open your browser and type: http://localhost

Install PhpMyAdmin

If you want to manage your MySQL created database efficiently then also install the open-source PHPMyAdmin for easy web database management user interface.

Install Apache For Windows 10

When it asks you to configure the database, then follow the guided wizard. Here a few screenshots to give you a quick idea.