I
invinity
Hey all,
I am currently writing a module that is designed to automate the
startup and management of Apache processes. In addition, the module is
designed to provide a VirtualHost-like environment, but with a
dedicated Apache process for each host, all on a single IP address. I
am hoping to get lots of input about the practicality of this program
and my current namespace, which is "Praesideo". Actually, I am still in
the process of converting the modules over to the "Praesideo"
namespace. My old namespace is "Server::ApacheIVHost."
If you're still interested at this point, but don't want to read all
the stuff I wrote below, you can go directly to browsing the Praesideo
code at http://svn.nvinity.net/Server-ApacheIVHost/trunk. I have not
yet setup anything through CPAN, because the code is not mature enough.
Please remember that the code is still in the old namespace.
How:
At the heart of Praesedio is a daemon package, Overseer, which pulls in
host/domain info. and manages file/folders/Apache processes based on
certain settings. Each Apache process is launched with mod_perl
handlers set to tie it into the Praesideo system. Adding a new host
(i.e. 'test.mydomain.com') is simply a matter of adding the host
information to your storage system. The Overseer daemon will
automatically create directories and launch Apache. Eventually, I want
to write a web-based admin interface to make this even easier.
As stated above Praesideo provides a VirtualHost-like setup with
individual Apache processes. This is accomplished by running a master
Apache process on port 80 that proxies requests to the appropriate real
host, which is listening on a different port.
To store all the information about hosts and domains managed by
Praesideo, I created a pluggable API so that any storage method can be
used as long as someone writes the code for it. As of now, I have
concentrated efforts on a module for SQL based storage.
Why:
Even with the small network I run, I was still manually adding
VirutalHosts to my Apache configuration files more often than I wanted.
I also wanted my friends to be able customize the Apache configuration
of their host, but I didn't want them to be able to issue restart
commands to Apache or be able to bring down all my sites with a bad
configuration directive. In addition, I ran into times when I really
wanted a new website up, but I needed the Apache process to run under a
different user than the default. With Apache 2, the 'prechild' MPM
would provide this functionality, but was not stable and I'm not sure
if it even is today.
Concerns:
My biggest concern are the extra resources required to run a seperate
Apache process for each host. To midigate this, the number of child
processes started by each Apache process can be reduced, along with
restricting the DSOs loaded by each Apache process. In addition, I've
been looking into creating groups of hosts that are all run under the
same process to reduce the total number of Apache processes.
I appreciate your time and input.
Thanks,
Matt Pitts
(e-mail address removed)
I am currently writing a module that is designed to automate the
startup and management of Apache processes. In addition, the module is
designed to provide a VirtualHost-like environment, but with a
dedicated Apache process for each host, all on a single IP address. I
am hoping to get lots of input about the practicality of this program
and my current namespace, which is "Praesideo". Actually, I am still in
the process of converting the modules over to the "Praesideo"
namespace. My old namespace is "Server::ApacheIVHost."
If you're still interested at this point, but don't want to read all
the stuff I wrote below, you can go directly to browsing the Praesideo
code at http://svn.nvinity.net/Server-ApacheIVHost/trunk. I have not
yet setup anything through CPAN, because the code is not mature enough.
Please remember that the code is still in the old namespace.
How:
At the heart of Praesedio is a daemon package, Overseer, which pulls in
host/domain info. and manages file/folders/Apache processes based on
certain settings. Each Apache process is launched with mod_perl
handlers set to tie it into the Praesideo system. Adding a new host
(i.e. 'test.mydomain.com') is simply a matter of adding the host
information to your storage system. The Overseer daemon will
automatically create directories and launch Apache. Eventually, I want
to write a web-based admin interface to make this even easier.
As stated above Praesideo provides a VirtualHost-like setup with
individual Apache processes. This is accomplished by running a master
Apache process on port 80 that proxies requests to the appropriate real
host, which is listening on a different port.
To store all the information about hosts and domains managed by
Praesideo, I created a pluggable API so that any storage method can be
used as long as someone writes the code for it. As of now, I have
concentrated efforts on a module for SQL based storage.
Why:
Even with the small network I run, I was still manually adding
VirutalHosts to my Apache configuration files more often than I wanted.
I also wanted my friends to be able customize the Apache configuration
of their host, but I didn't want them to be able to issue restart
commands to Apache or be able to bring down all my sites with a bad
configuration directive. In addition, I ran into times when I really
wanted a new website up, but I needed the Apache process to run under a
different user than the default. With Apache 2, the 'prechild' MPM
would provide this functionality, but was not stable and I'm not sure
if it even is today.
Concerns:
My biggest concern are the extra resources required to run a seperate
Apache process for each host. To midigate this, the number of child
processes started by each Apache process can be reduced, along with
restricting the DSOs loaded by each Apache process. In addition, I've
been looking into creating groups of hosts that are all run under the
same process to reduce the total number of Apache processes.
I appreciate your time and input.
Thanks,
Matt Pitts
(e-mail address removed)