Refactor for work with virtual hosts
Merge pull request #7 from wagnert/master

Refactor for work with virtual hosts