[lug] ifconfig/apache -- 2 ips, 2 domain names

Michael Belanger mrb at ciclops.org
Tue Oct 18 09:13:34 MDT 2005


David Owen Kritzberg wrote:


> It didn't occur to me that I should alias the new url, and just have
> ITS provide the DNS service for this.  Then, I think, I would have
> just had to configure Apache for the alias.

This is what you want.
have ITS give you a CNAME entry in DNS that has the hostname (dijon?) pointing 
to your current IP address (or hostname)

Then you set up a virtual host on your apache config -- catching that hostname.

<VirtualHost *:80>
   ServerName bike.colorado.edu
   DocumentRoot /var/www/html/bike/htdocs/
   ErrorLog /var/log/httpd/error_log
   CustomLog /var/log/httpd/access_log combined
</VirtualHost>

<VirtualHost *:80>
   ServerName dijon.colorado.edu
   DocumentRoot /var/www/html/dijon/htdocs/
   ErrorLog /var/log/httpd/error_log
   CustomLog /var/log/httpd/access_log combined
</VirtualHost>

  <Directory "/var/www/html/dijon/htdocs/">
    Options -Indexes Includes FollowSymLinks MultiViews ExecCGI
    Order allow,deny
    Allow from all
</Directory>

<Directory "/var/www/html/bike/htdocs/">
    Options -Indexes Includes FollowSymLinks MultiViews ExecCGI
    Order allow,deny
    Allow from all
</Directory>


> Instead, I asked for the url and a separate IP to go along with that.
> Now I am under the impression that, although there is nothing wrong
> with this, it will require more work or more knowledge on my part.
> This is in short supply!

A seperate IP is not the answer and is CERTAINLY more trouble.
1.  You need to configure your server (another nic or eth0:1 type config) so 
that your host is accepting connections for that IP.

2.  You will then need to configure apache with an IP-based setup (with the new 
IP).

3.  Firewall configuration for your interfaces may get complicated.



> Right now I have an IP tied to dijon.colorado.edu.  HTTP requests to
> dijon look in /var/www/html/.  Now the IT people have set up DNS to
> connect a new, different ip number to a new name, bike.colorado.edu.
> I would like requests to bike.colorado.edu/ to point to
> /var/www/html/bike/.  I don't have the ifconfig set up properly.
> Actually it isn't set up at all.  Can anyone show or point me to an
> example of what I should write in /etc/rc.d/rc.local/, or provide me
> with a name for this kind of configuration, if it has a special name? 

rc.local?  What?  Just do the CNAME and virtual host entrys (along with the 
associated <DIRECTORY> entries.

> 
> Thanks in advance,
> 
> Dave
> 
> 
> --------------------------------
> Dave Kritzberg
> University of Colorado Economics
> david.kritzberg at colorado.edu
> http://dijon.colorado.edu/
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug


-- 
Michael Belanger
CICLOPS, Space Science Institute

phone. 720-974-5853   Jabber: mrb at jabber.ciclops.org
fax.   720-974-5860

DISCLAIMER:
The Sender and Cassini Imaging Central Laboratory for Operations
accepts no liability for the content of this email, or for the
consequences of any actions taken on the basis of the information
provided, unless that information is subsequently confirmed in
writing. If you are not the intended recipient you are notified
that disclosing, copying, distributing or taking any action in
reliance on the contents of this information is strictly prohibited.



More information about the LUG mailing list