Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Feb 1996 14:16:52 -0700 (MST)
From:      Brandon Gillespie <brandon@tombstone.sunrem.com>
To:        bill clarke <wlclarke@cats.ucsc.edu>
Cc:        questions@freebsd.org
Subject:   Re: apache server
Message-ID:  <Pine.BSF.3.91.960206140424.22183C-100000@tombstone.sunrem.com>
In-Reply-To: <31168DB9.41C67EA6@cats.ucsc.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
> i am up and running FBSD 2.1 and running one web site on the apache
> server.
> 
> i want to add some more web sites(with their own domain names). do i
> need to acquire a unique ip address for each URL, or is there a way to
> host multiple sites on my server with only my single assigned ip?
> 
> thanks, a solution could save me money

Assuming you want to use the 'Virtual Server' option, where:

    http://www.base.com/comp1/...
    http://www.base.com/comp2/...
    http://www.base.com/comp3/...

Become:

    http://www.comp1.com/...
    http://www.comp2.com/...
    http://www.comp3.com/...

All using the same server/machine, then you do:

   1) get a seperate IP address for each domain (seperate from the
      machine's current IP address).
   2) edit /etc/sysconfig, remove the 'ifconfig_xxx' line for your
      ethernet defice.  i.e. if you use 'ed0' then it may look like:

+-------
network_interfaces="ed0 lo0"
ifconfig_ed0="inet 199.104.90.2  netmask 255.255.255.0"
ifconfig_lo0="inet localhost" 
+-------

      Change it to:

+-------
network_interfaces="ed0 lo0"
ifconfig_lo0="inet localhost"
+-------

      Then create /etc/start_if.xxx, where 'xxx' is your device (i.e.
      start_if.ed0 in the example above).  Doing this basically lets you
      handle setting it up by hand.  'start_if.xxx' should setup the network,
      and can be something like:

+-------
#!/bin/sh

# Initial configuration
ifconfig ed1 inet <real ip> netmask 255.255.255.0

# Aliases
ifconfig ed1 alias <alias ip> netmask 255.255.255.255
[other aliases]
+-------

       From there config apache, edit conf/httpd.conf and add something like:

+-------
<VirtualHost aliasname>
ServerAdmin webmaster@aliasname
DocumentRoot root for domain
ServerName aliasname
</VirtualHost>
+-------

       All of the above are sketchy.  I'd STRONGLY suggest reading the man
       pages on ifconfig and apache help FIRST.

-Brandon Gillespie-



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.960206140424.22183C-100000>