On Sun, Oct 25, 1998, John Leveron wrote:

>     Can anyone point me to a FAQ, etc. for how to setup my RH 5.1 /
> Apache 1.3.3 / ModSSL setup for IP based multiple hosts?
> 
>     I am currently using one IP, but will soon be given a block for
> multiple host names.  I will need to configure both Apache and my Linux
> box for this, so any pointers appreciated.

For Apache read http://www.apache.org/docs/vhosts/.
For setting up the IP aliases on the network interfaces,
perhaps read the appended text from the BeroFTPD distribution.

                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com

4. Configuring IP Address Aliases
---------------------------------

     You have to be able to setup IP address aliases in order for the
     virtual server support in BeroFTPD to work. Linux and BSDI,
     FreeBSD, SGI, Solaris 2.5*, AIX and others support this. What
     follows are "general" instructions on how to configure IP address
     aliases for the specified systems. Please check your system's
     'ifconfig' documentation for specific instructions.

     In order to make the changes to the required system files you will
     first need to login as root.

     4.1. Configuring IP Aliases on Sun Solaris 2.5:
     -----------------------------------------------

       1. Assure/place the system's normal hostname/IP address in the
          file /etc/hostname.le0.

       2. Insert the following in the system initialization file
          /etc/init.d/rootuser just after the if/fi test for
          interface_names.

          #
          # configure virtual host interfaces quietly.
          #
          /sbin/ifconfig le0:1 inet XXX.XXX.XXX.XXX netmask + broadcast
          + -trailers up 2>&1 > /dev/null

          Replace XXX.XXX.XXX.XXX with the IP address that you wish to
          alias.

     4.2. Configuring IP Aliases on SGI:
     -----------------------------------

       1. Edit /etc/hosts to include IP address and the name of the
          virtual server

       2. Edit /etc/config/ipaliases.options using comments in that
          file as a template:

          ec0 XXX.XXX.XXX.xxx netmask 0xffffff00 broadcast
          XXX.XXX.XXX.255

               or

          ec0 foobar netmask 0xffffff00 broadcast XXX.XXX.XXX.255

       3. /etc/chkconfig -f ipaliases on

     Replace XXX.XXX.XXX.xxx with the IP address that you wish to
     alias.
     Replace XXX.XXX.XXX.255 with the network's broadcast address.

     4.3. Configuring IP Aliases on FreeBSD:
     ---------------------------------------

       1. Edit /etc/netstart and put something like the following in.

          ifconfig de0 alias XXX.XXX.XXX.XXX netmask 0xffffffff

          (or use ed0 or some other netmask if appropriate)

     4.4. Configuring IP Aliases on AIX:
     -----------------------------------

     In the way AIX is shipped, there is no direct support for IP
     aliases in the ODM. This does not mean that AIX does not support
     IP aliases, it means that IP alias info is stored in an ASCII file
     rather than in the ODM.

       1. Edit the proper /etc/rc* file.

          If you are currently using an ODM TCP/IP configuration, edit
          the file /etc/rc.net.

          If you are using the traditional "BSD-style bootup method",
          edit the file /etc/rc.bsdnet instead.

       2. Add a line such as the following example.

          /usr/sbin/ifconfig tr0 inet xx.xx.xx.xx netmask yy.yy.yy.yy
          alias 1>/dev/null 2>&1

          Be sure to set the interface to the correct type if you are
          not using token ring (tr0) as the example shows.

     Refer to the ifconfig man pages. For more info on TCP/IP
     configuration and tuning, review the "no" command.

     4.5. Configuring IP Aliases on Linux:
     -------------------------------------
     First, make sure you have compiled a kernel that allows IP aliasing.
     You must enable both Network aliasing and IP aliasing for this to work.
     Add the line
          /usr/sbin/ifconfig eth0:0 xx.xx.xx.xx netmask yy.yy.yy.yy
     to the proper /etc/rc.d file (different in each distribution; you
     can recognize it by the fact that it contains other ifconfig commands).
     If you need more than one virtual host, you can do
          /usr/sbin/ifconfig eth0:1 xx.xx.xx.xx netmask yy.yy.yy.yy
          /usr/sbin/ifconfig eth0:2 xx.xx.xx.xx netmask yy.yy.yy.yy
          [...]
     If you are using a kernel version prior to 2.1.63, you will have to add
     routes so the virtual hosts are addressed:
          route add -host xx.xx.xx.xx

     4.6. After system configuration:
     --------------------------------

          In order to test your new configuration it is wise to
          reboot your system. This assures that your system is
          properly configured in the event of an non-planned
          system halt/reboot. A problem here is that the system is
          probably a production server for someone else... It is
          recommended that you add virtual www/ftp servers to your
          system at a scheduled maintenance time. Also, if you are
          adding more than one virtual server, add them all and
          simply reboot a single time. If you cannot reboot then
          execute the appropriate ifconfig (or chkconfig) command
          and test the reboot when you can.

          Also, if not immediately rebooting, it's not a bad idea
          to

               arp -s XXX.XXX.XXX.XXX x:x:xx:xx:xx:xx pub

          where XXX.XXX.XXX.XXX is the IP Address and where
          x:x:xx:xx:xx:xx is the Ethernet/whatever hardware
          physical address.

     4.7. Testing interfaces:
     ------------------------

          You need to assure you can see the interfaces using
          netstat and then try to ping the interface to assure it
          is responding. If so, your system is now ready. Now it's
          time to setup the FTPD server software and virtual
          server directories.

______________________________________________________________________
Apache Interface to SSLeay (mod_ssl)   www.engelschall.com/sw/mod_ssl/
Official Support Mailing List               [EMAIL PROTECTED]
Automated List Manager                       [EMAIL PROTECTED]

Reply via email to