We help IT Professionals succeed at work.
Get Started

Apache Web Servers

145 Views
Last Modified: 2020-03-22
Difference Between Apachectl and Httpd .Is apachectl -k start or httpd -k start  both the same .we have a pid file by the name httpd.pid but not apachectl.pid what is the difference .


pgrep httpd|head -5
6894
7971
8439
8946
9038
$ pgrep apache|head -5
$ pgrep apachectl|head -5
$ ps -ef|grep httpd|wc -l
58
$ ps -ef|grep apache|wc -l
71
$ ps -ef|grep apachectl|wc -l
1

$ ps -ef|grep apache|head -5

root      6894     1  0 23:13 ?        apache-2.2.22//bin/httpd -k start
root      6895  6894  0 23:13 ?        apache-2.2.22/logs/error.log_%Y%m%d 10M
root      6896  6894  0 23:13 ?        apache-2.2.22/logs/access.log_%Y%m%d 10M
root      6897  6894  0 23:13 ?        apache-2.2.22/logs/access.log_%Y%m%d 10M
root      6898  6894  0 23:13 ?        apache-2.2.22/logs/ssl_request.log_%Y%m%d 10M
daemon    6900     1  0 23:13 ?        00:00:00 LLAWP /apache-2.2.22/conf/WebAgent.conf -APACH
root      6906  6894  0 23:13 ?        apache-2.2.22/logs/mod_jk.log_%Y%m%d 10M
daemon    8946  6894  0 23:25 ?        /apache-2.2.22//bin/httpd -k start
daemon    9255  6894  0 23:27 ?    apache-2.2.22//bin/httpd -k start
daemon    9617  6894  0 23:29 ?        /apache-2.2.22//bin/httpd -k start


 ps -ef|grep httpd|head -5
root      6894     1  0 23:13 ?            apache-2.2.22//bin/httpd -k start
daemon    8439  6894  0 23:21 ?        /apache-2.2.22//bin/httpd -k start
daemon    8946  6894  0 23:25 ?        apache-2.2.22//bin/httpd -k start
daemon    9038  6894  0 23:26 ?        apache-2.2.22//bin/httpd -k start
daemon    9255  6894  0 23:27 ?        apache-2.2.22//bin/httpd -k start

daemon is user having in httpd.conf

getent passwd daemon
daemon:x:2:2:daemon:/sbin:/sbin/nologin

 cat httpd.conf|grep -i daemon
# httpd daemons, you will need to change at least LockFile and PidFile.
User daemon
Group daemon



can anyone explain clearly  the different outputs regarding the each command.
Comment
Watch Question
Application Development and Automation Management
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 9 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant

An Experts Exchange subscription includes unlimited access to online courses.

Get Started
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE