LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 457|回复: 2

apache 启动问题

[复制链接]
发表于 2006-8-8 06:19:48 | 显示全部楼层 |阅读模式
用命令 /usr/sbin/httpd 可以启动
在服务里直接启动不行,没有反应
用命令/usr/sibin/apachectr -start 启动没有反应

请问是不是apachectr的脚本有问题呢?这个文件我从来没有改过。下面是这个文件的内容,请高手看看要不要改什么啊,郁闷死了

  1. ARGV="$@"
  2. #
  3. # |||||||||||||||||||| START CONFIGURATION SECTION  ||||||||||||||||||||
  4. # --------------------                              --------------------
  5. #
  6. # the path to your httpd binary, including options if necessary
  7. HTTPD='/usr/sbin/httpd'
  8. #
  9. #
  10. # a command that outputs a formatted text version of the HTML at the
  11. # url given on the command line.  Designed for lynx, however other
  12. # programs may work.
  13. if [ -x "@LYNX_PATH" ]; then
  14.   LYNX="lynx -dump"
  15. else
  16.   LYNX=none
  17. fi
  18. #
  19. # the URL to your server's mod_status status page.  If you do not
  20. # have one, then status and fullstatus will not work.
  21. STATUSURL="http://localhost:80/server-status"

  22. # Source /etc/sysconfig/httpd for $HTTPD setting, etc.
  23. # Source /etc/sysconfig/httpd for $HTTPD setting, etc.
  24. if [ -r /etc/sysconfig/httpd ]; then
  25.    . /etc/sysconfig/httpd
  26. fi

  27. #
  28. # Set this variable to a command that increases the maximum
  29. # number of file descriptors allowed per child process. This is
  30. # critical for configurations that use many file descriptors,
  31. # such as mass vhosting, or a multithreaded server.
  32. ULIMIT_MAX_FILES="ulimit -S -n `ulimit -H -n`"
  33. # --------------------                              --------------------
  34. # ||||||||||||||||||||   END CONFIGURATION SECTION  ||||||||||||||||||||

  35. # Set the maximum number of file descriptors allowed per child process.
  36. if [ "x$ULIMIT_MAX_FILES" != "x" ] ; then
  37.     $ULIMIT_MAX_FILES
  38. fi

  39. ERROR=0
  40. if [ "x$ARGV" = "x" ] ; then
  41.     ARGV="-h"
  42. fi

  43. function checklynx() {
  44. if [ "$LYNX" = "none" ]; then
  45.    echo "The 'links' package is required for this functionality."
  46.    exit 8
  47. fi
  48. }

  49. function testconfig() {
  50. # httpd is denied terminal access in SELinux, so run in the
  51. # current context to get stdout from $HTTPD -t.
  52. if test -x /usr/sbin/selinuxenabled && /usr/sbin/selinuxenabled; then
  53.   runcon -- `id -Z` $HTTPD $OPTIONS -t
  54. else
  55.   $HTTPD $OPTIONS -t
  56. fi
  57. ERROR=$?
  58. }

  59. case $ARGV in
  60. restart|graceful)
  61.     if $HTTPD $OPTIONS -t >&/dev/null; then
  62.        $HTTPD $OPTIONS -k $ARGV
  63.        ERROR=$?
  64.     else
  65.        echo "apachectl: Configuration syntax error, will not run "$ARGV":"
  66.        testconfig
  67.     fi
  68.     ;;
  69. start|stop|graceful-stop)
  70.     $HTTPD $OPTIONS -k $ARGV
  71.     ERROR=$?
  72.     ;;
  73. configtest)
  74.     testconfig
  75.     ;;
  76. status)
  77.    checklynx
  78.     $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } '
  79.     ;;
  80. fullstatus)
  81.     checklynx
  82.     $LYNX $STATUSURL
  83.     ;;
  84. *)
  85.     $HTTPD $OPTIONS $ARGV
  86.     ERROR=$?
  87. esac

  88. exit $ERROR
复制代码
 楼主| 发表于 2006-8-9 06:49:44 | 显示全部楼层
.............郁闷
回复 支持 反对

使用道具 举报

发表于 2006-8-9 08:46:35 | 显示全部楼层
/sbin/service httpd start呢?

还有,是不是开了SELinux?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表