Installing XAMPP on Windows Server 2012r2

XAMPP is a program that makes having a local web server simple. With XAMPP you can easily handle a web server (Apache) plus MySQL. Here is how to install and configure XAMPP on a Windows Server 2012r2 from Vultr.

Connect to your server using the RDP program and go to this link to get XAMPP 7.4.2 which is a stable version packaged with PHP 7.4.2.

Once downloaded go through the install steps, when it asks for what modules to install only choose Apache, MYSQL and phpMyAdmin you don’t need anything else for a basic webserver. If it asks to install Bitnami click no.

It will take a few moments to install, start it up choose language either English or German. Once the XAMPP control panel is open click start on Apache.

xampp start

We may need to unblock a port for Apache to work so search for “firewall” and open up “Windows firewall with advanced security”. Create a new inbound rule for TCP, port 80 and just call it Apache.

Now navigate to C:\xampp\htdocs delete everything and create a simple index.php with the following code in it:

<?php
echo "Hello!";

Now back onto your computer or laptops web browser type in your servers IP and if it simply displays a page that says “Hello!” well done! If it keeps loading and nothing shows it may be a port issue, you will need to check what ports Apache is using in the XAMPP control panel.

As default the root directory for Apache is C:\xampp\htdocs.