[users@httpd] Running multiple httpd daemons

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On my server, I run the httpd daemon twice, using almost identical httpd.conf files, one on the main port (the live server) and one on a high numbered port (my working draft). Then I edit the files/configuration of the working draft server, restarting it as necessary. When all changes are in place, I rsync the working files to the live files, update the live server's httpd.conf file (by script, based on the working draft version) and restart the live server.

This all works fine, but one issue I have is running multiple copies. I do this by having two copies of apachectl with different configuration. The problem is, apachectl is really part of the apache install, and so any time it is upgrade, I need to grab a new copy of apachectl and reconfigure the two different versions. In fact, what I do is patch apacheclt by adding:

while [ $# -ne 0 ]
do
        case "$1" in
                --pidfile=*) PIDFILE=`echo "$1" | sed -e 's/^[^=]*=//'` ;;
                --httpd=*) HTTPD=`echo "$1" | sed -e 's/^[^=]*=//'` ;;
                --lynx=*) LYNX=`echo "$1" | sed -e 's/^[^=]*=//'` ;;
                --statusurl=*) STATUSURL=`echo "$1" | sed -e 's/^[^=]*=//'` ;;
                *)
                        break
                ;;
        esac
        shift
done

after the configuration section, and having my own apachectl-live and apachectl-work that just call apachectl with parameters.

Is there a better way to do this without patching or duplicating apachectl, or alternatively, can I request that apachectl be modified to support receiving parameters so that it doesn't need to be patched?

I use 1.3.x, but I checked the latest 2.x source and it looks like apachectl still doesn't receive parameters, although it has a complex data driven chunk of code to generate the config parameters so adding the above code would require understanding that data driven stuff, presumably not hard for whoever maintains it.

Thanks,
   Peter.

--
Check out Interarchy 8, just released.
<http://www.stairways.com/>  <http://download.stairways.com/>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux