|
用命令 /usr/sbin/httpd 可以启动
在服务里直接启动不行,没有反应
用命令/usr/sibin/apachectr -start 启动没有反应
请问是不是apachectr的脚本有问题呢?这个文件我从来没有改过。下面是这个文件的内容,请高手看看要不要改什么啊,郁闷死了
- ARGV="$@"
- #
- # |||||||||||||||||||| START CONFIGURATION SECTION ||||||||||||||||||||
- # -------------------- --------------------
- #
- # the path to your httpd binary, including options if necessary
- HTTPD='/usr/sbin/httpd'
- #
- #
- # a command that outputs a formatted text version of the HTML at the
- # url given on the command line. Designed for lynx, however other
- # programs may work.
- if [ -x "@LYNX_PATH" ]; then
- LYNX="lynx -dump"
- else
- LYNX=none
- fi
- #
- # the URL to your server's mod_status status page. If you do not
- # have one, then status and fullstatus will not work.
- STATUSURL="http://localhost:80/server-status"
- # Source /etc/sysconfig/httpd for $HTTPD setting, etc.
- # Source /etc/sysconfig/httpd for $HTTPD setting, etc.
- if [ -r /etc/sysconfig/httpd ]; then
- . /etc/sysconfig/httpd
- fi
- #
- # Set this variable to a command that increases the maximum
- # number of file descriptors allowed per child process. This is
- # critical for configurations that use many file descriptors,
- # such as mass vhosting, or a multithreaded server.
- ULIMIT_MAX_FILES="ulimit -S -n `ulimit -H -n`"
- # -------------------- --------------------
- # |||||||||||||||||||| END CONFIGURATION SECTION ||||||||||||||||||||
- # Set the maximum number of file descriptors allowed per child process.
- if [ "x$ULIMIT_MAX_FILES" != "x" ] ; then
- $ULIMIT_MAX_FILES
- fi
- ERROR=0
- if [ "x$ARGV" = "x" ] ; then
- ARGV="-h"
- fi
- function checklynx() {
- if [ "$LYNX" = "none" ]; then
- echo "The 'links' package is required for this functionality."
- exit 8
- fi
- }
- function testconfig() {
- # httpd is denied terminal access in SELinux, so run in the
- # current context to get stdout from $HTTPD -t.
- if test -x /usr/sbin/selinuxenabled && /usr/sbin/selinuxenabled; then
- runcon -- `id -Z` $HTTPD $OPTIONS -t
- else
- $HTTPD $OPTIONS -t
- fi
- ERROR=$?
- }
- case $ARGV in
- restart|graceful)
- if $HTTPD $OPTIONS -t >&/dev/null; then
- $HTTPD $OPTIONS -k $ARGV
- ERROR=$?
- else
- echo "apachectl: Configuration syntax error, will not run "$ARGV":"
- testconfig
- fi
- ;;
- start|stop|graceful-stop)
- $HTTPD $OPTIONS -k $ARGV
- ERROR=$?
- ;;
- configtest)
- testconfig
- ;;
- status)
- checklynx
- $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } '
- ;;
- fullstatus)
- checklynx
- $LYNX $STATUSURL
- ;;
- *)
- $HTTPD $OPTIONS $ARGV
- ERROR=$?
- esac
- exit $ERROR
复制代码 |
|