httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James G Smith <>
Subject Re: Server auto-reconfiguration
Date Mon, 13 Mar 2000 22:54:37 GMT
"Philippe M. Chiasson" <> wrote:
>As soon as some more detailled specs on this are decided upon, I am ready
>to give it a try with 'good old Stas'.  But I think It's a pretty big
>feature, so it should be planned a quite a bit to provide a very modular
>implementation, simplyfing a great deal adding new configuration
>directives from a module, and so on... 

Forgetting implementation issues for the moment, I can think of the following
needed in an API:

  These could be one api call:
  + modify a simple directive
  + modify a simple directive within a block
  + modify a simple directive within a nested block

  These could be one api call:
  + clear a directive (AddType, Alias, etc.) so we can start over
  + clear a configuration so we can redo it completely
  + set up communication channel (shared memory, pipes, etc.)
  + break down communication channel

We might be able to use a file I/O model for this:


But it could be a bit awkward.  Another model could be a file/directory

  ap_config_remove (vs. unlink)

Then, the following code could list the simple directives in the

  config = ap_config_open('/');
  if(config) {
    while(entry = ap_config_read(config)) {
      printf("/%s\n", entry);

This is still kludgy, but it's a start.  Things like virtual hosts
would need to end up being access as ap_config_open("/VirtualHost/")
to see how it was configured.  Not sure if this is good or not for
adding modules...

The API function names aren't too imaginative either.

Possible problems with shared memory include the segment being created
by the parent.  If the parent is running as root, then the segment is
owned by root.  We don't want to chmod it 0666 to allow child access.
I don't know enough about shared memory to know if you can chown it.
My experience is with IPC::Shareable.  We would also need to get a
different segment every time we start so we don't clash with other
Apache servers.
James Smith - |

View raw message