Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Oct 1999 06:58:05 -0600
From:      "Bert Hiddink" <hiddink@galileo.or.cr>
To:        freebsd-questions@freebsd.org
Subject:   Setting up IP-based Virtual Hosts for FreeBSD
Message-ID:  <19991021125334.9B04914D4E@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
Hello,

I have FreeBSD 2.2.8 with Apache 1.3. on a Windows LAN.

I would like to set-up IP-based Virtual Hosts feature of Apache for 
FreeBSD. Therefore I created multiple IP-alias with the ifconfig 
command.
/sbin/ifconfig ed0 alias 192.168.1.11 netmask 255.255.255.255
/sbin/ifconfig ed0 alias 192.168.1.12 netmask 255.255.255.255
...

So far, so good. Then I added to the /etc/hosts:

192.168.1.11            local.sipromicro.com
192.168.1.12            local.coopnetaldia.org
192.168.1.13            local.coopnetupdate.org
192.168.1.14            local.associate-expert.net
192.168.1.15            local.microempresa.org
192.168.1.16            local.apache.org
192.168.1.17            local.galileo.or.cr
192.168.1.18            local.coninpyme.org

Then I edited the httpd.conf of Apache:

<VirtualHost 192.168.1.11>
DocumentRoot /usr/local/www/data/hp-sipromicro
ServerName local.sipromicro.com
</VirtualHost>

<VirtualHost 192.168.1.12>
DocumentRoot /usr/local/www/data/hp-coopnetaldia
ServerName local.coopnetaldia.org
</VirtualHost>

<VirtualHost 192.168.1.13>
DocumentRoot /usr/local/www/data/hp-coopnetupdate
ServerName local.coopnetupdate.org
</VirtualHost>

<VirtualHost 192.168.1.14>
DocumentRoot /usr/local/www/data/hp-associate-expert
ServerName local.associate-expert.net
</VirtualHost>

<VirtualHost 192.168.1.15>
DocumentRoot /usr/local/www/data/hp-microempresa
ServerName local.microempresa.org
</VirtualHost>

<VirtualHost 192.168.1.16>
DocumentRoot /usr/local/www/htdocs
ServerName local.apache.org
</VirtualHost>

<VirtualHost 192.168.1.17>
DocumentRoot /usr/local/www/data/hp-galileo
ServerName local.galileo.or.cr
</VirtualHost>

<VirtualHost 192.168.1.18>
DocumentRoot /usr/local/www/data/hp-coninpyme
ServerName local.coninpyme.org
</VirtualHost>

>From a Windows machine, I can now acces the Virtual Hosts by typing 
on the IP-address in my browser, and this points correctly to the
respective directory. However, I would like this to work with the 
Virtual Hostnames f.e. instead of using 192.168.1.12 typing directly
http://local.coopnetaldia.org (see the example above).

However, I can not get did worked. What I am doing wrong here?
Do I need a DNS-server for this?

Any help would be greatly appreciated!

Regards,

-brt





   Bert Hiddink, FUNDACION GALILEO
   Correo electronico: hiddink@galileo.or.cr
   Sitio: http://www.galileo.or.cr
   Tel. (506) 280 8683, telefax. (506) 280 8847


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991021125334.9B04914D4E>