Some of the apachectl commands are related.
apachectl stop
apachectl start
apechtctl status
apachectl restart
apachectl -t
apachectl -S
apachectl -M
apachectl -V
For Solaris 10 and Solaris Express if apache is running under the control of Service Management Facility (SMF,
you need to use the the following commands:
svcs -a apache22
svcs -a | grep -i apache
svcadm disable apache22
svcadm disable -t apache22
svcadm enable apache22
svcsadm enable -t apache22
svcsadm restart apache22
svcsadm refresh apache22
svcsadm clear apache22
MySolaris
/usr/apache2/2.2/bin
total 15 drwxr-xr-x 3 root bin 22 2011-02-18 20:41 bin drwxr-xr-x 3 root bin 13 2011-02-18 20:41 build drwxr-xr-x 2 root bin 101 2011-02-18 20:41 include drwxr-xr-x 4 root bin 5 2011-02-18 20:41 lib drwxr-xr-x 3 root bin 78 2011-02-18 20:41 libexec drwxr-xr-x 3 root bin 3 2011-02-18 20:41 manual drwxr-xr-x 2 root root 3 2011-09-28 00:57 tmp
-r-xr-xr-x 1 root bin 3587 2011-02-18 20:41 apachectl
apachectl: executable shell script
#!/bin/sh #
if [ "x$ULIMIT_MAX_FILES" != "x" ] ; then $ULIMIT_MAX_FILES fi ERROR=0 if [ "x$ARGV" = "x" ] ; then ARGV="-h" fi if [ ! -d "/var/run/apache2/2.2" ]; then mkdir -p /var/run/apache2/2.2 chown -R webservd /var/run/apache2/2.2 chgrp -R webservd /var/run/apache2/2.2 fi case $ARGV in start|stop|restart|graceful|graceful-stop) $HTTPD -k $ARGV ERROR=$? ;; startssl|sslstart|start-SSL) echo The startssl option is no longer supported. echo Please edit httpd.conf to include the SSL configuration settings echo and then use "apachectl start". ERROR=2 ;; configtest) $HTTPD -t ERROR=$? ;; status) $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } ' ;; fullstatus) $LYNX $STATUSURL ;; *) $HTTPD $ARGV ERROR=$? esac exit $ERROR
Syntax OK
webservd 11272 723 0 Oct 04 ? 0:02 /usr/apache2/2.2/bin/httpd -k start webservd 27990 723 0 Oct 09 ? 0:01 /usr/apache2/2.2/bin/httpd -k start webservd 746 723 0 Oct 04 ? 1:31 /usr/apache2/2.2/bin/httpd -k start root 723 1 0 Oct 04 ? 3:12 /usr/apache2/2.2/bin/httpd -k start webservd 14317 723 0 20:36:58 ? 0:00 /usr/apache2/2.2/bin/httpd -k start webservd 11897 723 0 Oct 11 ? 0:01 /usr/apache2/2.2/bin/httpd -k start webservd 27564 723 0 Oct 09 ? 0:01 /usr/apache2/2.2/bin/httpd -k start webservd 14315 723 0 20:36:57 ? 0:00 /usr/apache2/2.2/bin/httpd -k start webservd 7217 723 0 Oct 08 ? 0:02 /usr/apache2/2.2/bin/httpd -k start webservd 14621 723 0 Oct 11 ? 0:01 /usr/apache2/2.2/bin/httpd -k start webservd 11896 723 0 Oct 11 ? 0:01 /usr/apache2/2.2/bin/httpd -k start webservd 14316 723 0 20:36:58 ? 0:00 /usr/apache2/2.2/bin/httpd -k start
root 14932 1 2 21:01:26 ? 0:01 /usr/apache2/2.2/bin/httpd -k start webservd 14934 14932 0 21:01:28 ? 0:00 /usr/apache2/2.2/bin/httpd -k start webservd 14933 14932 0 21:01:28 ? 0:00 /usr/apache2/2.2/bin/httpd -k start webservd 14936 14932 0 21:01:28 ? 0:00 /usr/apache2/2.2/bin/httpd -k start webservd 14937 14932 0 21:01:28 ? 0:00 /usr/apache2/2.2/bin/httpd -k start webservd 14935 14932 0 21:01:28 ? 0:00 /usr/apache2/2.2/bin/httpd -k start webservd 14938 14932 0 21:01:28 ? 0:00 /usr/apache2/2.2/bin/httpd -k start
svcs: -a ignored when used with arguments. STATE STIME FMRI online 21:01:26 svc:/network/http:apache22
root 14932 1 1 21:01:26 ? 0:02 /usr/apache2/2.2/bin/httpd -k start webservd 15059 14932 0 21:31:26 ? 0:00 /usr/apache2/2.2/bin/httpd -k start webservd 15055 14932 0 21:31:26 ? 0:00 /usr/apache2/2.2/bin/httpd -k start webservd 15060 14932 0 21:31:26 ? 0:00 /usr/apache2/2.2/bin/httpd -k start webservd 15057 14932 0 21:31:26 ? 0:00 /usr/apache2/2.2/bin/httpd -k start webservd 15056 14932 0 21:31:26 ? 0:00 /usr/apache2/2.2/bin/httpd -k start webservd 15058 14932 0 21:31:26 ? 0:00 /usr/apache2/2.2/bin/httpd -k start root@MySolaris:/var/apache2/2.2/htdocs#