> Date: Sun, 11 Jun 2000 09:35:20 +1000
> From: "Marty" <[EMAIL PROTECTED]>
> Subject: RE: [SLUG] Virtual hosts on a dynamic IP
>
> Hi Paul,
>
> Sounds like a problem.
>
> If you have a dynamic IP address, how are visitors going to be able to
> resolve your domain to any particular IP? ie, if I type www.yoursite.com.au
> in my browser how will my machine find yours anyway? The settings in your
> httpd.conf are secondary to this problem.
>
> There used to be free dynamic DNS services on the net - anyone know if these
> still exist?
There's http://www.justlinux.com which among other things offer a
dynamic DNS service. The client is a perl script which can be run from
your PPP script.
As for changing the web config.... copy the httpd.conf file to a
backup file and say httpd.conf.src. Edit the src file to have
__MY_IP_ADDRESS__ wherever the IP address occurs. Then try this script
out
#!/bin/bash
MYIP=`/sbin/ifconfig ppp0 | grep inet | awk '{print $1}' | awk
-F: '{print $2}`
sed -s "/__MY_IP_ADDRESS__/$MYIP/g" httpd.conf.src >httpd.conf
There are no doubt many more elegant ways of doing this, for example
see /etc/sysconfig/network-scripts/ip-up which gives your script the
IP address straight off.
Also, another tip with apache... /etc/rc.d/init.d/httpd restart
doesen't restart *everything* with apache. For IP & virtual server
stuffing around I find that stopping & starting makes damn sure it
will do it.
---<GRiP>---
Grant Parnell [EMAIL PROTECTED] ([EMAIL PROTECTED])
Ph: 02-8701-4564 Mob: 0408-686-201 Web: http://www.poboxes.com/gripz
No Microsoft products were used in the production of this message.
--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text