setting up MacPorts apache2 with virtual hosts and PHP 5.6

I just needed an apache webserver with PHP 5.6 and some virtual hosts on my Mac running OSX El Capitan. The native OSX apache version comes with an older version of PHP which has no xdebug support, so I shut it down with sudo apachectl stop Installation I installed the following ports: sudo port install apache2 php56 php56-apache2handler php56-xdebug Apache configuration After installing the following commands are needed: cd /opt/local/apache2/modules sudo /opt/local/apache2/bin/apxs -a -e -n php5 mod_php56.