Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My hosting service, Webfaction, installs apache start scripts for django/python apps automatically. The installed start script is:

#!/bin/bash
LD_LIBRARY_PATH=/home/mertnuhoglu/webapps/dj02/apache2/lib /home/mertnuhoglu/webapps/dj02/apache2/bin/httpd.worker -f /home/mertnuhoglu/webapps/dj02/apache2/conf/httpd.conf -k start

This script starts an httpd.worker instance:

 3364       00:03  8950 /home/mertnuhoglu/webapps/dj02/apache2/bin/httpd.worker

Recently, I followed a tutorial for custom app installation. In this tutorial, start script is defined as:

#!/bin/bash
/home/rocketmonkeys/webapps/django/apache2/bin/apachectl start

This script starts an httpd -k start:

 0.0  1620 17462 /home/mertnuhoglu/webapps/django/apache2/bin/httpd -k start

I would like to ask three things:

  1. What is the difference between these two ways of starting apache server?

  2. In the first script, which executable (httpd.worker or httpd.conf or something else) is run?

  3. Why does httpd instance in the second example has -k start parameter? Is this due to apachectl?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted
  1. apachectl is a wrapper over httpd and just sets some environment variables and adds further functionality, like configtest, more in detail here. httpd.worker is like httpd but with the worker module enabled.

  2. The first script executes the httpd.worker binary with the httpd.conf configuration file.

  3. Correct, apachectl appends the -k start parameter to httpd

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.