My router forwards port 80 data to my Ubuntu Server box. I have another machine (Windows 7, running XAMPP) on my local network that is only sometimes on. Using a virtual host or otherwise, I wanted my Ubuntu box to forward data for a particular domain to the windows machine only when its on, and otherwise display a "Unavailable" page instead.
|
feedback
|
|
I believe that your best bet would be to set up a bash script as a cron job. The basic logic would be:
Updating Apache can be as simple as changing the sites_enabled back and forth, once you have the proper sites set up. | |||
|
feedback
|
|
You could use mod_proxy to do this quite simply.
This will return a 503 | |||
|
feedback
|
|
Setup a proxy config to the backend, make sure the timeouts are nice and low, and setup the error page that gets displayed on proxy timeout (504, from memory) to be your unavailable page. 10 minutes with the Apache manual should have you sorted for the exact configuration options to use. | |||
|
feedback
|