LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-17-2009, 05:01 AM   #1
AndyBG
LQ Newbie
 
Registered: Oct 2009
Posts: 5

Rep: Reputation: 0
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.
 
Old 10-17-2009, 05:11 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
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)
Code:
find / -name "*httpd*"  (may take a while)
OR

Code:
man httpd
##if the command is there, then so should be the man page.
 
Old 10-17-2009, 05:23 AM   #3
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Try
Code:
apache2 -V
 
Old 10-17-2009, 05:43 AM   #4
AndyBG
LQ Newbie
 
Registered: Oct 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for the quick responses.

find / -name "*httpd*"

Code:
/etc/apache2/httpd.conf
/usr/share/doc/apache2-doc/manual/programs/httpd.html
/usr/share/doc/apache2-doc/manual/programs/httpd.html.ko.euc-kr
/usr/share/doc/apache2-doc/manual/programs/httpd.html.en
/usr/share/doc/libnet-server-perl/examples/httpd.gz
/usr/share/doc/apache2.2-common/examples/apache2/original/httpd.conf.gz
/usr/share/doc/apache2.2-common/examples/apache2/original/extra/httpd-multilang-errordoc.conf
/usr/share/doc/apache2.2-common/examples/apache2/original/extra/httpd-languages.conf.gz
/usr/share/doc/apache2.2-common/examples/apache2/original/extra/httpd-vhosts.conf
/usr/share/doc/apache2.2-common/examples/apache2/original/extra/httpd-ssl.conf.gz
/usr/share/doc/apache2.2-common/examples/apache2/original/extra/httpd-info.conf
/usr/share/doc/apache2.2-common/examples/apache2/original/extra/httpd-userdir.conf
/usr/share/doc/apache2.2-common/examples/apache2/original/extra/httpd-manual.conf
/usr/share/doc/apache2.2-common/examples/apache2/original/extra/httpd-dav.conf
/usr/share/doc/apache2.2-common/examples/apache2/original/extra/httpd-default.conf
/usr/share/doc/apache2.2-common/examples/apache2/original/extra/httpd-mpm.conf
/usr/share/doc/apache2.2-common/examples/apache2/original/extra/httpd-autoindex.conf
/usr/share/doc/apache2.2-common/examples/apache2/extra/httpd-multilang-errordoc.conf
/usr/share/doc/apache2.2-common/examples/apache2/extra/httpd-languages.conf.gz
/usr/share/doc/apache2.2-common/examples/apache2/extra/httpd-vhosts.conf
/usr/share/doc/apache2.2-common/examples/apache2/extra/httpd-ssl.conf.gz
/usr/share/doc/apache2.2-common/examples/apache2/extra/httpd-info.conf
/usr/share/doc/apache2.2-common/examples/apache2/extra/httpd-userdir.conf
/usr/share/doc/apache2.2-common/examples/apache2/extra/httpd-manual.conf
/usr/share/doc/apache2.2-common/examples/apache2/extra/httpd-dav.conf
/usr/share/doc/apache2.2-common/examples/apache2/extra/httpd-default.conf
/usr/share/doc/apache2.2-common/examples/apache2/extra/httpd-mpm.conf
/usr/share/doc/apache2.2-common/examples/apache2/extra/httpd-autoindex.conf
/usr/lib/apache2/modules/httpd.exp
man httpd

Code:
No manual entry for httpd
apache2 -V

Code:
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_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT=""
 -D SUEXEC_BIN="/usr/lib/apache2/suexec"
 -D DEFAULT_PIDLOG="/var/run/apache2.pid"
 -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)

Code:
# debian etch i386 port defaults
deb http://ftp2.ca.debian.org/debian etch main contrib non-free
deb http://ftp2.ca.debian.org/debian-security etch/updates main contrib non-free
Thanks!
 
Old 10-17-2009, 06:34 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
http://httpd.apache.org/docs/2.2/
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.......
 
Old 10-17-2009, 09:58 AM   #6
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
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?
 
Old 10-17-2009, 11:00 AM   #7
AndyBG
LQ Newbie
 
Registered: Oct 2009
Posts: 5

Original Poster
Rep: Reputation: 0
@AlucardZero : That did the trick! Thanks
 
Old 12-17-2010, 03:41 PM   #8
jangulasion
LQ Newbie
 
Registered: Dec 2010
Posts: 5

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

use this instead:
apache2ctl - S
 
Old 12-22-2011, 10:23 AM   #9
x16man
LQ Newbie
 
Registered: Dec 2011
Posts: 1

Rep: Reputation: Disabled
Post I'm using Ubuntu11.10

In Ubuntu you can use the command:
apache2 -l

to show compiled in modules.
 
  


Reply

Tags
debian, httpd



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting httpd: httpd: Syntax error on line 209 of /etc/httpd/conf/httpd.conf: Syntax sethukpathi Linux - Networking 6 04-12-2008 11:26 AM
Apache 2.0.47 Error when try to run the command httpd -S wanna13e Linux - Enterprise 14 07-06-2007 01:31 AM
httpd -l and mysql -p at any command line prompt ZC1 Linux - General 1 05-23-2006 09:58 AM
HELP Apache Command not there, and some httpd.conf opt's badgerbox76 Linux - Newbie 9 12-08-2005 04:48 PM
Command to restart httpd service deWin Linux - Software 2 07-13-2004 06:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 01:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration