Thom
Thom
Jul 10, 2017 · 1 min read

Hi John! Thank you so much for this amazing article :)
I follow all the steps and everything works good until the Virtual Hosts..
I don’t understand why it doesn’t work and it drives me crazy ^^

Here my files conf:

/private/etc/apache2/extra/httpd-vhosts.conf

#Virtual Host Entry for foo.localhost
<VirtualHost *:80>
DocumentRoot “/Users/thom/Sites/foo”
ServerName foo.localhost
ErrorLog “/private/var/log/apache2/foo-error_log”
CustomLog “/private/var/log/apache2/foo-access_log” common
</VirtualHost>

#Virtual Host Entry for bar.localhost
<VirtualHost *:80>
DocumentRoot “/Users/thom/Sites/bar”
ServerName bar.localhost
ErrorLog “/private/var/log/apache2/bar-error_log”
CustomLog “/private/var/log/apache2/bar-access_log” common
</VirtualHost>

/private/etc/hosts

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost

# === Local sites ===
127.0.0.1 foo.localhost
127.0.0.1 bar.localhost

    Thom

    Written by

    Thom