# How to manage Virtual Host

Cherokee supports Virtual Host configuration.

You can create different files for each virtual host into the directory `sites-available/` and then you can enable it with a symlink to directory `sites-enabled/`.

The standard cherokee package has a `sites-available/example.com` file that you can use to create your own virtual host configuration files:

    ##
    ## Virtual server for example.com
    ##
    Server example.com, www.example.com {
              DocumentRoot /tmp

              Directory / {
                              Handler common
              }

              Include /etc/cherokee/sites-enabled/common.conf

              ##
              ## Rest of the virtual host configuration..
              ## Add your parameters here..
              ##
    }

Explanation:

- Server: The list of names about the server will be reached. This enables cherokee to serve diferent Virtual Host by name.
- Include: common.conf:

              DirectoryIndex index.php, index.htm

              Directory / {
                      Handler common
              }

              Extension php {
                      Handler phpcgi
              }

File with common configuration.

- DocumentRoot
- Directory
- Rest of virtual host configuration