[lug] ifconfig/apache -- 2 ips, 2 domain names
hugh at math.byu.edu
Tue Oct 18 11:08:49 MDT 2005
I should preface the rest of my comments with this: the recommendation to
do name based filtering (from others) is an easier path. If you don't
think you'll need to do SSL for this site, it might be easier to call ITS
back and say, can we switch the bike.colorado.edu to a CNAME for dijon.
However, sticking to this path allows for the possibility of doing SSL for
the two paths and putting them on different machines in the future (if
> > There are a few different ways to accomplish what you are doing. First,
> > you need to get your linux box listening for the IP tied to
> > bike.colorado.edu
> > I'm not sure how to use the gui to do it, but from the command line:
> > cd /etc/sysconfig/network-scripts
> > cp ifcfg-eth0 ifcfg-eth0:0
> > now edit ifcfg-eth0:0 and change the DEVICE line to read
> > DEVICE=eth0:0
> > and edit the IPADDR line to have the correct ip address
> > Now, do "service network start" and the machine should start listening on
> > that ip address.
> This works! Thanks! But will it survive a reboot? Do I still need
> to mess around with ifconfig?
This will survive a reboot if ONBOOT="yes" is set. You don't have to mess
with ifconfig, the fedora/redhat scripts take care of that for you. You
won't need the GATEWAY= line (if present) in the ifcfg-eth0:0 file.
> > As for apache, I believe you can add a section like this for your
> > bike.colorado.edu website:
> > <VirtualHost 188.8.131.52>
> > ServerName bike.uiowa.edu
> > ServerAdmin david.kritzberg at colorado.edu
> > CustomLog logs/bike.colorado.edu
> > ErrorLog logs/bike.colorado.edu_error
> > DocumentRoot /var/www/bike/html
> > </VirtualHost>
> > as a starting point.
> > You probably don't want to mix dijon and bike's DocumentRoot. So I'd
> > leave dijon in /var/www/html and create /var/www/bike/html for bike
> Do you mean /var/www/html/bike or /var/www/bike/html?
By default redhat/fedora sets the document root to be /var/www/html
If you put bike.colorado with the document root in /var/www/html/bike,
then going to dijon.colorado.edu/bike will expose the
content at bike.colorado.edu. If there is any
security needed (username/password) for bike.colorado.edu then you
probably want to keep the namespaces separate.
So in my original email, I meant /var/www/bike/html because I prefer to
keep separate websites separate. If it is your intent to mix the two
sites and provide multiple paths to the content (via dijon or bike), then
use /var/www/html/bike (but be prepared for some future maintenance pain).
More information about the LUG