Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Updating config files with dynamic ip

by mr.nick (Chaplain)
on Jul 27, 2001 at 17:56 UTC ( [id://100304] : note . print w/replies, xml ) Need Help??


in reply to Updating config files with dynamic ip

Well, first of all I would suggest that you upgrade your version of Apache. Newer versions (>= 1.3.19) allow for wildcards in your httpd.conf file. Here is a snippet of mine:
NameVirtualHost * <VirtualHost *> DocumentRoot /web/htdocs/mrnick ServerName www.mrnick.binary9.net CustomLog logs/mrnick.log combined CustomLog logs/access.log mine </VirtualHost> <VirtualHost *> DocumentRoot /web/htdocs/radio CustomLog logs/radio.log combined Servername ourthing.radio.binary9.net CustomLog logs/access.log mine </VirtualHost>
Notice how no IP addresses are directly coded into the file? This would allow you NOT to have to update it everytime you change IP's. You might have to apachectl restart it after it has changed, though. If you are using dhcpc, there is a file (/etc/dhcpc/dhcpcd-eth0.exe) that is run when your IP address changes. Just restart your server from in there.

mr.nick ...