The host name to ip resolution is a typically DNS function. For example you would want an A record to host.t2p.lt and a CNAME for www.host.t2p.lt
that points to the same address. In your Apache configuration you can use an ALIAS directive for the host, which will tell Apache that the particular host file is for both host.t2p.lt and www.host.t2p.lt
, but it requires that these addresses both resolve to the same location.