AW: map a hostname to a subdirectory?

Peer Stefan stefan.peer at tiwag.at
Mon Oct 1 15:12:38 UTC 2001


hi,

you got something wrong there: bind matches names and ip-addresses. this has
nothing what so ever to do with filesystems or any other os-specific or
application-specific function.
if you want to host some domains and provide one http-daemon for all
domains, you have to use CNAMES and virtual hosts (at least with apache).

check this httpd.conf:

NameVirtualHost 192.168.0.10

<VirtualHost 192.168.0.10>
  ServerName www.internal.domain
  ServerAlias internal.domain
  DocumentRoot /path/to/webdomain/one
  ....
</VirtualHost>

<VirtualHost 192.168.0.10>
  ServerName www.other.internal.domain
  Serveralias other.internal.domain
  DocumentRoot /any/other/path/leading/to/webdomain/two
  ....
</VirtualHost>

ok, www.internal.domain, www.other.internal.domain and internal.domain and
other.internal.domain have to be CNAMES or A-records pointing to
192.168.0.10.

regards,
Stefan



-----Ursprüngliche Nachricht-----
Von: henkehus at hotmail.com [mailto:henkehus at hotmail.com]
Gesendet: Montag, 01. Oktober 2001 16:55
An: comp-protocols-dns-bind at moderators.isc.org
Betreff: map a hostname to a subdirectory?



Hello,

Is it possible with BIND to map a host name to a subdirectory on
another host, not just to an IP?

Example:
I would like someserver.somedomain.com to map to
153.153.153.153/some_sub_directory

I could to this with a redirect through a CGI script instead, but then
I would have to use URL:s like
http://someserver.somedomain.com?/mypath/myfile.htm to access a
certain file, I would like this file to be accessible through
http://someserver.somedomain.com/mypath/myfile.htm, even though it's
actually at 153.153.153.153/some_sub_directory/mypath/myfile.htm.

Any ideas? Could I maybe configure this in Apache instead?

Thanks
/henkehus


More information about the bind-users mailing list