[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sheflug] Dynamic IP virtual hosting problem in Apache



This might be overly simplistic for the setup, but can't you kill/restart
apache in the ip-up.local file for your connection? That way whenever your
connection is dropped, as soon as it reconnects apache will be reloaded and
thus be using the new IP's...
--
Graham

----- Original Message -----
From: "Neil R Porter" <xxxxx [at] btinternet.com>
To: <shef-lug [at] list.sheflug.org.uk>
Sent: Wednesday, July 03, 2002 10:09 AM
Subject: [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.

___________________________________________________________________

Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html

  GNU the choice of a complete generation.