Accept an instance variable for host.

Almost all configuration accept environments variables but not host.
Added a spec for this and the default remains if there is no env so it
is backward compatible.