Can someone help me set up virtual hosts with MAMP on OSX10.4? I cant get it to work properly...
In MAMP I have:
APACHE PORT: 80
MYSQL PORT: 3306
and Document Root is:
My hosts file is:
# 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 beautybytara.local
My httpd.conf file ends with:
In my Sites folder I have a folder named beautybytara in which all the site files exist.
### Section 3: Virtual Hosts
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
# Please see the documentation at
# for further details before you try to setup virtual hosts.
# You may use the command line option '-S' to verify your virtual host
# Use name-based virtual hosting.
After restarting MAMP and pointing my browser to : http://beautybytara.local
I just get the Test page for apache Installation page - even though there is an index file in the folder. If I type http://beautybytara.local/index.html I still get the same page.
If I go to http://localhost then I get a test index page load up that I placed in the Sites directory.
If I go to http://localhost/beautybytara then site load as expected but because the document root is at the Sites folder and not the beautybytara folder the PHP code does work as it uses document root in the code to find includes etc.
What am I doing wrong? I want each folder in the Sites directory to act as its own document root.