Is it possible to make a virtual host available based on time?
Can the configuration be done within the httpd.conf file directly without the use of external commands?
Never heard of a module doing that (well it has been proved false anyway), but of course you can have your virtual host settings in its own conf file, and then set a cron job to rename it(so it won't get loaded) and trigger a reload of apache's configuration...no downtime.
You may get some mileage out of mod_rewrite for this as the RewriteCond directive has access to time and date variables TIME_YEAR
, TIME_MON
, TIME_DAY
, TIME_HOUR
, TIME_MIN
, TIME_SEC
, TIME_WDAY
, and TIME
.
So you could do something like for example
RewriteCond %{TIME_HOUR} >16
RewriteCond %{TIME_HOUR} <22
RewriteRule ^index\.html$ /1622.html
or whatever you want really.