I have mentioned here apache web server because i am using that one.
I just had a look at this page but not sure how relevant its to yours.
The basic idea is to replace all of the static configurations with a mechanism that works them out dynamically. This has a number of advantages:
- Your configuration file is smaller, so Apache starts more quickly and uses less memory.
- Adding virtual hosts is simply a matter of creating the appropriate directories in the filesystem and entries in the DNS - you don't need to reconfigure or restart Apache.
It turned out that the solution was to use VirtualDocumentRoot instead of just the plain old DocumentRoot setting for a single virtual host. This allowed specifying the $0 variable as part of the value. So we ended up being able to have “VirtualDocumentRoot /somedir/$1″.
Make any changes to your VirtualHosts, then do
To make sure there aren't any outstanding syntax errors, and run this:
The USR1 or graceful signal causes the parent process to advise the children to exit after their current request (or to exit immediately if they're not serving anything). The parent re-reads its configuration files and re-opens its log files. As each child dies off the parent replaces it with a child from the new generation of the configuration, which begins serving new requests immediately.
Basically any existing connections stay intact, so it's not the same as a full restart - this is how I usually do this on production servers with dozens of sites.