XAMPP Virtual Host on MAC OSX

This is very repeatable process to configure Virtual Hosts (especially when you need to work with PHP CMS’es like Drupal or WordPress). Lets gather all steps which you need to do to configure them:

1. Configuration of Apache
In file:

/Applications/XAMPP/xamppfiles/etc/httpd.conf

Uncommment:

Include /Applications/XAMPP/etc/extra/httpd-vhosts.conf

2. Add Virtual Host
In file:

/Applications/XAMPP/xamppfiles/etc/httpd.conf

Add:

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot "/Users/piotr/_free/typo3_src-8.2.1"
    ServerName local.typo3
    ErrorLog "logs/dummy-host2.example.com-error_log"
    CustomLog "logs/dummy-host2.example.com-access_log" common
</VirtualHost>

3. Add line redirection in hosts file
In file:

/etc/hosts

Add your virtual host address:

127.0.0.1 your.domain

In case you have a problem:

Access forbidden!

You don’t have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.

<VirtualHost *:80>
    DocumentRoot "/your/path"
    ServerName local.typo3
    Options Indexes FollowSymLinks MultiViews
    <Directory "/your/path">
        Allow from all
        Require all granted
    </Directory>
</VirtualHost>

Restart your XAMPP and voila!