Setup a local web development environment with XAMPP for MacOS

XAMPP is an easy to install Apache distribution containing MariaDB, PHP and Perl.

XAMPP  is a popular open-source software stack that provides a development environment for web applications and is completely free. The XAMPP open source package has been set up to be incredibly easy to install and to use. It includes an Apache web server containing MySQL or MariaDB and PHP (including Perl), which is the stack you primarily need for web development.

Apache Configuration Test

MacBook Pro turned on beside Apple Magic Mouse on top of white surface

When making changes in your httpd-vhost.conf file, make sure to test it before reloading the apache config file or restarting apache.

Mac OSX

apachectl configtest

XAMPP OSX

/Applications/XAMPP/xamppfiles/bin/apachectl configtest

Errors should display, if there are any, otherwise you'll see the Syntax OK to indicate that there are no errors and you can reload the apache config file or restart apache.