Named-Based Virtual Hosts wt Dynamic DNS

Daniel Rinehart danielr at ccs.neu.edu
Sun Jan 16 12:39:56 EST 2000


> Can anyone help me with a scheme to update 
> the IP address in the NameVirtualHost line in Apache config file.

	One approach is to create a master config file with some known
unique string where the IP should go. Something like:

	NameVirtualHost MY_IP_HERE:80

	Then when ever you know your IP changes, run a little shell script
that puts the new IP into place and restarts the server. This is very
untested:

#!/bin/sh

sed -e 's/MY_IP_HERE/$1/' apache.config.master > apache.config
apachectl restart

-- Daniel R. <danielr at ccs.neu.edu> [http://www.ccs.neu.edu/home/danielr/]

-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).



More information about the Discuss mailing list