Operating System - HP-UX
1820595 Members
1301 Online
109626 Solutions
New Discussion юеВ

Apache is running or not in HPUX box

 
HP UNIX Professionals
Frequent Advisor

Apache is running or not in HPUX box

Hi Expers,

I want check the the Apache is running or not in HPUX box (HP-UX XXXX B.11.23 U ia64 1719401429)
Please give the command for the same.

XXXXX:/ # httpd -v
sh: httpd: not found

XXXXX:/ # ./apachectl -v
sh: ./apachectl: not found.

XXXXX:/ # swlist -l product | grep -i apache
SG-Apache-Tool B.04.01 Serviceguard Apache Script Templates
hpuxwsAPACHE B.2.0.58.01 HP-UX Apache-based Web Server


Thanks & Regards,

VINAY
5 REPLIES 5
Steven Schweda
Honored Contributor

Re: Apache is running or not in HPUX box

> XXXXX:/ # ./apachectl -v

Why "./"? Were you expecting "apachectl" to
be in your (undisclosed) current working
directory?

> I want check the the Apache is running or
> not [...]

Why? If I wanted to know if a Web server
was working, I'd probably use wget to ask it
to do something.
Bill Hassell
Honored Contributor

Re: Apache is running or not in HPUX box

> not found

Doesn't tell you anything except that your current $PATH does not have httpd in the listed directories. To determine if a web server is running (or any process for that matter), you use ps as in ps -ef. If the list is too long, use ps to find the process by name:

UNIX95=1 ps -fC httpd


Bill Hassell, sysadmin
HP UNIX Professionals
Frequent Advisor

Re: Apache is running or not in HPUX box

Hi Pls find the output
There is some configuration file also ther

xxxxxx:/ # cd /opt/hpws/apache/conf
xxxxxx:/opt/hpws/apache/conf # ll
total 512
-r--r--r-- 1 bin bin 135 Dec 18 2006 cache.conf
-rw-r--r-- 1 bin bin 2003 Dec 20 2006 highperformance-std.conf
-rw-r--r-- 1 bin bin 2003 Dec 18 2006 highperformance.conf
-rw-r--r-- 1 bin bin 38472 Oct 31 2007 httpd-std.conf
-rw-r--r-- 1 bin bin 38480 Aug 20 2008 httpd.conf
-rw-r--r-- 1 bin bin 486 Dec 18 2006 ldap.conf
-rw-r--r-- 1 bin bin 12958 Dec 18 2006 magic
-rw-r--r-- 1 bin bin 15058 Dec 18 2006 mime.types
-r--r--r-- 1 bin bin 568 Dec 18 2006 mod_jk.conf
-r--r--r-- 1 bin bin 364 Dec 18 2006 mod_jk2.conf
-rw-r--r-- 1 bin bin 40624 Jan 3 2007 php.ini
-rw-r--r-- 1 bin bin 10888 Dec 20 2006 ssl-std.conf
-rw-r--r-- 1 bin bin 10900 Oct 31 2007 ssl.conf
drwxr-xr-x 2 bin bin 96 Oct 31 2007 ssl.crt
drwxr-xr-x 2 bin bin 96 Oct 31 2007 ssl.key
-rw-r--r-- 1 bin bin 717 Dec 18 2006 stunnel.conf
-r--r--r-- 1 bin bin 3001 Dec 18 2006 workers.properties
-r--r--r-- 1 bin bin 453 Dec 18 2006 workers2.properties

------------------------------------------
xxxx:/ # ps -ef | grep apache| more
root 14414 29743 1 10:30:05 pts/1 0:00 grep apache
www 4642 4639 0 May 24 ? 23:16 /software/sas/prodbin/apache2/bin/httpd -d /software/sas/prodbin/apache2 -k start
www 4640 4639 0 May 24 ? 0:00 /software/sas/prodbin/apache2/bin/httpd -d /software/sas/prodbin/apache2 -k start
hpsmh 15105 15093 0 May 27 ? 0:00 /opt/hpws/apache/bin/httpd -k start -DSSL -f /opt/hpsmh/conf/smhpd.conf
root 15093 1 0 May 27 ? 6:33 /opt/hpws/apache/bin/httpd -k start -DSSL -f /opt/hpsmh/conf/smhpd.conf
sasowner 5115 1 0 May 24 ? 62635:01 /opt/java1.4/bin/IA64N/java -Djava.util.logging.manager=org.apache.juli.ClassLoad
erLogManager -Dfile.encoding=UTF-8 -XdoCloseWi
root 4639 1 0 May 24 ? 9:52 /software/sas/prodbin/apache2/bin/httpd -d /software/sas/prodbin/apache2 -k start
www 25892 4639 0 Jun 3 ? 22:04 /software/sas/prodbin/apache2/bin/httpd -d /software/sas/prodbin/apache2 -k start
www 20773 4639 0 Dec 16 ? 4:27 /software/sas/prodbin/apache2/bin/httpd -d /software/sas/prodbin/apache2 -k start
---------------------------------

xxxxx:/ # apachectl -v
sh: apachectl: not found.
---------------------------------

Patrick Wallek
Honored Contributor

Re: Apache is running or not in HPUX box

It appears that you do have httpd daemons running, which could be apache.

Your 'apachectl' command is NOT in your default path. It is probably in /opt/hpws/apache/bin.

You will need to search for the command, then run it.

**IF** it is in /opt/hpws/apache/bin, you could run it one of 2 ways:

# /opt/hpws/apache/bin/apachectl -v

or

# cd /opt/hpws/apache/bin
# ./apachectl -v

Steven Schweda
Honored Contributor

Re: Apache is running or not in HPUX box

> [...] you could run it one of 2 ways:

Or, the third of two ways, add the
appropriate directory to PATH.