httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Andersson" <rob...@profundis.nu>
Subject Re: [users@httpd] help needed on multiple domain root directories ver 1.3.28 Win32
Date Thu, 25 Sep 2003 04:34:22 GMT
Webmaster wrote:
> I have the system32/drivers directory... there is no subdirectory off
it...
> [...]
> I suspect that is an NT/2000/XP configuration thing. I'm running W98SE

Uhm, it seems so. A search revieled that it should be located in the Windows
directory, eg. c:\windows\hosts

> although the aim is to move it all perhaps a month or so to a Linux or
> QNX box but I'm assuming the configuration will be fairly similar.

Yes, the problem here is the clients rather than the server.

You could also consider running your own (local) DNS, so that your LAN
computers can resolve your hostnames to their private IPs. That can be
tricky business, though.

> In an email you wrote to someone else around this time I saw the
following,
> and wonder if I can adapt it for my own use, perhaps, changing the port
> number to 80 presumably?

Not really the same problem. The problem for you is that you cannot use
hostnames, because they resolve to a public IP (which your router can't deal
with), and if you use the private IP, Apache cannot determine which host to
serve from.

An ugly workaround, could be something like this:

    Listen 80
    Listen 81
    Listen 82

    NameVirtualHost *

    <VirtualHost *:80>
        ServerName eagles-lair.dyndns.org
        ...
    </VirtualHost>

    <VirtualHost *:80 *:81>
        ServerName warrinavalley.dyndns.org
        ...
    </VirtualHost>

    <VirtualHost *:80 *:82>
        ServerName anotherhost.dyndns.org
        ...
    </VirtualHost>

I have not tested anything like that, but I think it would work. Hopefully
it would work normally from outside, but also enable you to access the other
sites from within your LAN by using its private IP and append the port
number (except for the first vhost). Like this (although the port is
redundant in the first case):

    http://192.168.0.2:80/  --> eagles-lair.dyndns.org
    http://192.168.0.2:81/  --> warrinavalley.dyndns.org
    http://192.168.0.2:82/  --> anotherhost.dyndns.org

If it seems cryptic, read the docs on Virtual Host matching:
http://httpd.apache.org/docs-2.0/vhosts/details.html

You could also give the sites their own private IPs in a similar way.

Regards,
Robert Andersson


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message