This directory is mounted into the ``httpd`` and ``php`` container, so that both know where all projects can be found. This is also the place where you create ``project directories`` for each of your projects.
By having created a project directory, the web server container has created a new virtual host. However it has noticed, that the actual document root directory does not yet exist and therefore it cannot serve any files yet.
Step 3: create a docroot directory
----------------------------------
..note::
As desribed in :ref:`prerequisites` the docroot directory name must be ``htdocs`` for now.
Navigate to your newly created project directory and create a directory named `htdocs` inside it.
..code-block:: bash
# navigate to your Devilbox git directory
host> cd path/to devilbox
# navigate to your above created project directory
host> cd data/www/project-1
# create the docroot directory
host> mkdir htdocs
Vist the vhost page again and see what has changed: http://localhost/vhosts.php
..image:: /_static/img/devilbox-vhosts-dns.png
**So what has happened?**
By having created the docroot directory, the web server is now able to serve your files. However it has noticed, that you have no way yet, to actually visit your project url, as no DNS record for it exists yet.
The intranet already gives you the exact string that you can simply copy into your ``/etc/hosts`` file on your host operating system to solve this issue.
..important::
This will only work on **native Docker** for Linux or MacOS. Read up on the next section to also find out how to do that on **Docker Toolbox** and Windows.
Step 4: create a DNS entry
--------------------------
..note::
This step can also be automated via the bundled DNS server to automatically provide catch-all
DNS entries to your host computer, but is outside the scope of this
*getting started tutorial*.
Add DNS for Linux and MacOS (native Docker)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
On Linux and MacOS (when using the native Docker), this step is fairly simple. The intranet provides
you the exact string you need to paste into your ``/etc/hosts`` file on your host operating system.
..code-block:: bash
# Open your /etc/hosts file with sudo or root privileges
# and add the following DNS entry
host> sudo vi /etc/hosts
127.0.0.1 project-1.loc
Add DNS for Windows (native Docker)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
On Windows (when using the native Docker), you can also copy paste the command provided by the intranet,
however the destination file is different. You have to add this string into: ``C:\Windows\System32\drivers\etc``.
Open ``C:\Windows\System32\drivers\etc`` with admistrative privileges and add the following entry
..code-block:: bash
127.0.0.1 project-1.loc
Add DNS for Docker Toolbox
^^^^^^^^^^^^^^^^^^^^^^^^^^
When using ``Docker Toolbox`` the Devilbox runs inside a virtual machine and therefore the Webserver port (``80``)
is not exposed to your host operating system. So your DNS record must point to the virtual machine instead of your
host system.
1. Find out the IP address the virtual machine is running on
2. Add a DNS entry to your host operating system for this IP address.
For the sake of this example, let's assume the virtual machine is running on ``192.16.0.1``, then the DNS record you will
have to add instead on your host operating system is:
**Docker Toolbox on MacOS**
..code-block:: bash
host> sudo vi /etc/hosts
192.16.0.1 project-1.loc
**Docker Toolbox on Windows**
Open ``C:\Windows\System32\drivers\etc`` with admistrative privileges and add the following entry
..code-block:: bash
192.16.0.1 project-1.loc
Back to intranet
^^^^^^^^^^^^^^^^
Vist the vhost page again and see what has changed: http://localhost/vhosts.php