Syronex: sofware, technology.

Customizing Apache Configuration in VPS Environments

Virtual private server (VPS) environments provide a flexible and efficient way to run network applications in a cost effective way: you have the flexiblity of a full UNIX environment but most functions can be managed using a visual control panel. The most typical application supported by common VPS offerings is web hosting, but people also use VPS systems to host software engineering tools, development and testing environments, etc.
Unfortunately the management consoles that come with VPS platforms are mostly adapted to simple web server configurations. This wouldn't be a problem if there was the option for advanced users to take over the configuration of a facility like the web server and configure it manually. However this is something that generally can't be done safely: not only the management tools are not sophisticated enough to integrate your manual changes, but they may override your customized configuration at any time.

I have written a small tool to remedy this problem. The ApCO tool manages the master copy of your Apache httpd.conf file and overwrites the live copy of the file (e.g. /etc/httpd/conf/httpd.conf) whenever it detects the file has been changed.
After ApCO has been installed, you should perform any changes to your Apache configuration in the master configuration file (in the apco directory), not in the live httpd.conf. You need to restart Apache with the service command: service httpd restart.

ApCO Features

ApCO Requirements

Linux (should also work with another System V Unix), Python

ApCO Installation

As root, save apco.tar.gz in /usr/local and execute tar xzf apco.tar.gz. You then need to edit the file apco/apco.py and enter your email address in the configuration section (the other parameters have reasonable defaults.)

Copy your httpd.conf file to /usr/local/apco. This will be your master configuration file.

Edit /etc/rc.d/init.d/httpd (on Linux; may be different on another System V Unix) and change:

start() {
.
.
.
to:
start() {
        # 
        # ApCO
        #
        /usr/local/apco/apco.py
.
.
.

Add to del.icio.us
Download ApCO