Apache and changing the root dir on the fly

Apache and changing the root dir on the fly

Post by Mitko Stoyano » Sat, 14 Mar 1998 04:00:00



Hello,

I've got a project which requires updating files in the server root dir
frequently (every 10 sec for example).
The way I'm thinking of doing this is to make 2 identical dirs, and the
Apache root dir to be symlink to one of them. I can update the directory
which is currently not root, recreate the symlink to point to the
updated directory, and update the dir which ceased to be root to keep
them identical. In summary:

1. symlink points to one of the actual roots:

webroot -> rootA
           rootB

2. Update arrives and a separate OS server process puts
the files in rootB.

3. The OS server process moves the symlink to the updated dir:

           rootA
webroot -> rootB

4. The OS server process updates also  rootA.

The updates will come via FTP.

Questions:

Is Apache caching the root dir internally (It is a configuration
directive), and if cached, would the symlink be cached or the actual
directory?

I can send a signal to the server process to reread the configs, but it
looks ugly and not very reliable to me to do kill -16  every 10 seconds.

The box is 300 Mhz Ultra Enterprise 2 , the server will serve only
static pages with projected 1 -1.5 million hits per day.

Any thoughts?

Thanx in advance.
--
Mitko Stoyanov
Systems Engineer                                Ph. (02) 9288 3635

http://www.ni.com.au/