NEW: If you need some different virtual hosts, bitnami has a proper way of configuration. Although the standard apache vhost will work, it might be better to follow the bitnami philosophy.
In "/pathToInstallation/mampstack-xxxxx/apache2/conf/httpd.conf",
make sure that
Include "/pathToInstallation/mampstack-xxxxx/apache2/conf/bitnami/bitnami.conf"
is not commented.
In "/pathToInstallation/mampstack-xxxxx/apache2/conf/bitnami/bitnami.conf"
make sure that
Include "/pathToInstallation/mampstack-xxxxx/apache2/conf/bitnami/bitnami-apps-vhosts.conf"
is not commented
In "/pathToInstallation/mampstack-xxxxx/apache2/conf/bitnami/bitnami-apps-vhosts.conf",
you can add the VirtualHost configuration. something like:
Listen 8081
<VirtualHost *:8081>
ServerAdmin Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser.
DocumentRoot "/Users/_username_/Sites/www"
ErrorLog "/Users/_username_/Sites/logs/dummy-host-error_log"
CustomLog "/Users/_username_/Sites/logs/dummy-host-access_log" common
<Directory "/Users/_username_/Sites/www">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Note, that I had to add the "Listen 8081".
In the "manager-osx" in the "Manage Servers", select the "Apache Web Server" and click restart.
In the "Server Events" tab you can see if you have syntax errors, or if the server starts without problems.
To check if all VirtualHosts are available and seen
sudo /pathToInstallation/mampstack-xxxxx/apache2/bin/apachectl -t -D DUMP_VHOSTS