-   Debian (
-   -   Where is the httpd -S command (

AndyBG 10-17-2009 05:01 AM

Where is the httpd -S command
I have a Debian Etch distribution.

My "Apache Cookbook" (O'Reilly, December, 2007) tells me that "It is particularly instructive to run httpd -S and observe the virtual host configuration as Apache understands it"

However, when I type-in the command, I am told "-bash: httpd: command not found" which is particularly uninstructive.

I've had a good rummage around in my server but I can't pin-point exactly where this command is?

Thanks to anyone who can help.

pixellany 10-17-2009 05:11 AM

I assume that Apache is installed....

Did you try running the command as root (First do "su -", so that you get root's environment)

Try this in a terminal (as root)

find / -name "*httpd*"  (may take a while)


man httpd
##if the command is there, then so should be the man page.

repo 10-17-2009 05:23 AM


apache2 -V

AndyBG 10-17-2009 05:43 AM

Thanks for the quick responses.

find / -name "*httpd*"



man httpd


No manual entry for httpd
apache2 -V


Server version: Apache/2.2.3
Server built:  Jul 29 2009 09:49:56
Server's Module Magic Number: 20051115:3
Server loaded:  APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture:  32-bit
Server MPM:    Prefork
  threaded:    no
    forked:    yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D SUEXEC_BIN="/usr/lib/apache2/suexec"
 -D DEFAULT_PIDLOG="/var/run/"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="/var/run/apache2/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types"
 -D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"

It looks like I don't have it. What should I do to get it?

My /etc/apt/sources.list looks like this (if it's of any use)


# debian etch i386 port defaults
deb etch main contrib non-free
deb etch/updates main contrib non-free


pixellany 10-17-2009 06:34 AM
This describes the option you are talking about, but also says that "httpd" is not the normal way to start the daemon.

In your output from find, there seem to be some manuals. but no "httpd" command.

I've never used Apache, so we've pretty much hit the wall as far as getting help from me.......

AlucardZero 10-17-2009 09:58 AM

RedHat changed Apache's name to "httpd". Debian didn't, so you won't find an httpd binary. I don't use Apache either, but doesn't apache2 -S work?

AndyBG 10-17-2009 11:00 AM

@AlucardZero : That did the trick! Thanks

jangulasion 12-17-2010 03:41 PM

apache2 -S wont work in Ubuntu
you will get this error:
apache2: bad user name ${APACHE_RUN_USER}

use this instead:
apache2ctl - S

x16man 12-22-2011 10:23 AM

I'm using Ubuntu11.10
In Ubuntu you can use the command:
apache2 -l

to show compiled in modules.

All times are GMT -5. The time now is 06:17 AM.