[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Sheflug] Dynamic IP virtual hosting problem in Apache
Hi All
Me again. Thought I would split up the emails as they are totally
different really.
I would be most grateful to anyone who could get their minds round this
one.
I have a dynamic IP. I use dyndns.org along with ddclient on my server
(Mandy 8.1) so I always have my domains pointing at my box, even if my
IP changes. I have virtual hosting setup on Apache. Simple
configuration. I have one dir per domain in home. Everything works
fine!
domain1.homelinux.net gets directed to /home/neil/webpages/domain1
and
domain2.homelinux.net gets directed to /home/neil/webpages/domain2
etc.
However, occasionally my connection drops and it comes back after a bit
with a new IP. That's OK, because ddclient updates dyndns and
domain1.hom...and domain2.hom... now point to the new IP. However, and
this is the problem, unless I restart Apache, the vhosting stops
working, and everything (domain1, domain2, etc.) all point to Docroot.
I suspect this problem is because I define vhosts using domain1 and
domain2 and when Apache starts it resolves these and then those (now
old) IPs are fixed.
If I am right, how can I get Apache to check periodically that
domain1.homelinux.net still resolves to the current IP and, if not, then
restart or something?
I've rambled on far too long now, so I won't include vhosts.conf as it
works.
I would be so grateful if I could sort this problem out, because
everything would coast along so nicely without me having to restart
Apache once a week (damn BT).
Neil
___________________________________________________________________
Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html
GNU the choice of a complete generation.