Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 ...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://100304]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-24 22:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found