Apache的配置文件语法错误,问题所在?怎么修改?

我IBM   的AIX4.3下安装用root用户安装apache,提示安装成功!我一律采用默认值。  
   
  当我用   ../../bin/apachectl   start   启动时,提示语法错误:  
  Syntax   error   on   line   296   of   /rtdb/apache/apa20/conf/httpd.conf:  
  Expected   </Directory>   but   saw   </Directory>  
   
  由于我在windows、Linux   下都安装过,从没碰到这种错误。  
   
  请问这是怎么回事?是apache内核问题?  
  应该不是AIX的问题?因为在装AIX时自带IBM   HTTPServer这个可以运行。  
  IBM   HTTPServer   安装在   /usr/HTTPServer  
  我的现在安装在   /swes/apache  
   
  请问高手,具体是哪儿的错?怎么修改?

****************************************************************************

肯定是配置文件有错误啦,这么一点错误你都不会改,好笨笨,你们公司怎么会请你做事?太不公平了,我现在可失业中啊?谁来帮我呀。。。。。。。。。。。。。。。。。。。。。。。。。。。。  
   
  其实apache的配置文件也很有条理,你买一本apache管理大全,看一下就知道哪个选项是干什么的。  
  <Directory>与</Directory>是配对使用的。中间是一些配置选项。  
  错误提示是少了一个</Directory>。请注意:<Directory>也可带属性,这有点类似XML语法,你有没有看过XML?但APACHE的配置文件并不全是按照XML文档来制定的

怎么改?  
  vi   /swes/apache/conf/httpd.conf  
  然后搜索Directory,看看<Directory与</Directory>是否匹配就行了,很有可能是哪一行</Directory>被#给注释掉了,你去掉它前面的#就行了。  
  快去改,改完了来给我加分

4 楼gflei(学而实习之)回复于 2001-11-13 19:45:27 得分 0

先请教个实质问题:这个错误是由哪个模块引起的?  
  也就是说:系统缺少了什么文件,才引起这种问题?  
  今天在我调试的过程中,发现不但有这个错误还有<Files>类似错误。  
  首先想知道的是:这是操作系统的引起的还是Aapche引起的?  
   
  lurenfu所说的那种错误根本不可能发生,因为我的还没修改那些文件,采用的是默认配置!  
  所以说:错误不在配置文件上。。  
   
  希望能得到高手的指点,错误在哪?Top

5 楼lurenfu(具有中国特色的社会主义初级阶段,一百年不变)回复于 2001-11-13 19:50:18 得分 0

你有检查过配置文件没有?不可能是程序或系统引起的,这个错误肯定是由apache的配置文件引起的,apache跟系统是独立的,没有什么系统文件可以控制apache的行为Top

6 楼gflei(学而实习之)回复于 2001-11-13 20:34:19 得分 0

回lurenfu:   首先我没动过配置文件;其次我也检查过配置文件,没有不匹配的问题。  
  这个现在只可能跟系统中原先有老版本的apache有关了。Top

7 楼lurenfu(具有中国特色的社会主义初级阶段,一百年不变)回复于 2001-11-13 21:29:40 得分 0

卸载掉原来的老版,重新安装Top

8 楼superdreamer(只懂一点点!)回复于 2001-11-14 09:10:34 得分 10

to   gflei:你说的问题应该是AIX的编译器问题。我找到方法给你帖上来!Top

9 楼superdreamer(只懂一点点!)回复于 2001-11-14 09:17:29 得分 35

你的apache版本是多少呀?你的问题是AIX编译器的bug原因!你自己到网上去找吧,应该能找到方法的!在www.google.com上输入:Expected   </Directory>   but   saw   </Directory>  
  你会得到很多有用的信息的,若解决了别忘来加分:)Top

10 楼lurenfu(具有中国特色的社会主义初级阶段,一百年不变)回复于 2001-11-14 09:19:43 得分 5

啊?AIX怎么会有那么重要的BUG?Top

11 楼superdreamer(只懂一点点!)回复于 2001-11-14 09:29:40 得分 0

谁知道呢?也许是他版本的原因吧,AIX我没用过,不知道BUG解决了没有;  
  Top

12 楼gflei(学而实习之)回复于 2001-11-14 12:14:23 得分 0

to:   superdreamer.我用Apache是1.3.22版本的,至于AIX的BUG我还没查。  
   
  不过那原先自带的IBM   HTTPServer怎么就可以用?那不需要编译不?不管怎么样,谢过了先!Top

13 楼superdreamer(只懂一点点!)回复于 2001-11-14 12:17:33 得分 0

你到网上去查了没有,你看过就知道了Top

14 楼gflei(学而实习之)回复于 2001-11-14 13:23:28 得分 0

to:   superdreamer   刚刚查了一下全是英文,需仔细研究,如果你一直到怎么做?不妨告诉我?  
   
  关于分数的问题,那不是问题!Top

15 楼gflei(学而实习之)回复于 2001-11-14 13:27:43 得分 0

to:   superdreamer   补充一下编译器版本:4.4.0.0Top

16 楼superdreamer(只懂一点点!)回复于 2001-11-14 13:41:49 得分 0

楼上老兄,你自己慢慢看吧:)你哪个东西,我没用过,我想你会找到解决方法的。不好   意思啦,我不是高手,我只能帮你到这儿啦Top

17 楼amorzh(快车)回复于 2001-11-14 13:56:14 得分 10

有可能与系统有关,关于读</directory>配置命令,是在apache内核中实现的,你的命令出错是因为apache在源程序中比较两个字符串相等(cmd->end_token和cmd->cmd->name)是利用判断两个字符串的指针的值是否一致(他认为这两个字符串指针应该指向同一个地方,他这样做也是为了节省时间,)  
   
  你这个问题是因为两个字符串虽然是一样的,但是他们并不是指向同一个地方。可能在编译时加一些define??Top

18 楼lurenfu(具有中国特色的社会主义初级阶段,一百年不变)回复于 2001-11-14 14:01:23 得分 0

妈的,系统有个内核,你现在到好,应用程序也叫内核了,apache顶多只是个应用程序,你写一个hello,world的程序除了行为跟apache不一样外,没有任何区别,apache有内核,hello,world也有内核。这样一来,操作系统有内核,应用程序也有内核,那。。。。。。。  
   
  我实在是被你们的概念给搞糊涂了,去你姥姥的,乱用词汇Top

19 楼gflei(学而实习之)回复于 2001-11-14 14:29:01 得分 0

to:   amorzh   非常感谢您能解释得这么清楚,我现在还不具备改写apache内核的能力。不过问题的确像superdreamer所说的,是编译器的问题,我现在正在查有关资料,等问题解决一定会告诉大家。Top

20 楼gflei(学而实习之)回复于 2001-11-14 16:53:04 得分 0

现在很高兴告诉大家,在superdreamer的提示下,我已经解决了自己的问题!  
   
  再次再次感谢关系此问题的人!特别感谢superdreamer!!  
   
  解决问题的办法:  
            1.先看次文:  
  Full   text   of   PR   number   2312:  
  Received:   (qmail   27406   invoked   by   uid   2012);   28   May   1998   19:08:53   -0000  
  Message-Id:   <[email protected]>  
  Date:   28   May   1998   19:08:53   -0000  
  From:   Tim   Evans   <[email protected]>  
  Reply-To:   [email protected]  
  To:   [email protected]  
  Subject:   syntax   error   in   distributed   httpd.conf   file  
  X-Send-Pr-Version:   3.2  
   
  >Number:                   2312  
  >Category:               os-aix  
  >Synopsis:               syntax   error   in   distributed   httpd.conf   file  
  >Confidential:       no  
  >Severity:               serious  
  >Priority:               medium  
  >Responsible:         apache  
  >State:                     closed  
  >Class:                     sw-bug  
  >Submitter-Id:       apache  
  >Arrival-Date:       Thu   May   28   12:10:00   PDT   1998  
  >Last-Modified:     Thu   May   27   12:42:51   PDT   1999  
  >Originator:           [email protected]  
  >Organization:  
  >Release:                 1.3b7  
  >Environment:  
  AIX   4.3;   AIX   cc    
  >Description:  
  After   compiling   and   installing   1.3b7   in   default   location,   I   changed   *only*   the   port   number   in  
  the   distributed   httpd.conf   file.     httpd   fails   to   start   with   this   error:  
   
  Syntax   error   on   line   40   of   /usr/local/apache/conf/access.conf:  
  Expected   </Directory>   but   saw   </Directory>  
   
  NOTE:     "Expected   </Directory>   but   saw   </Directory>"  
  >How-To-Repeat:  
   
  >Fix:  
   
  >Audit-Trail:  
  State-Changed-From-To:   open-analyzed  
  State-Changed-By:   coar  
  State-Changed-When:   Sun   Sep   27   09:41:57   PDT   1998  
  State-Changed-Why:  
   
  This   is   a   known   problem   with   the   AIX   C   compiler   (see   also  
  PRs   2534,   2664,   2853,   and   3042).     IBM   are   aware   of   the  
  problem.     I'm   putting   this   report   into   'analyzed'   so   we  
  can   notify   you   of   the   correction   if   and   when   we   get   one.  
   
  Category-Changed-From-To:   general-os-aix  
  Category-Changed-By:   coar  
  Category-Changed-When:   Sun   Sep   27   09:41:57   PDT   1998  
   
  State-Changed-From-To:   analyzed-closed  
  State-Changed-By:   [email protected]  
  State-Changed-When:   Sun   Dec   13   14:54:32   PST   1998  
  State-Changed-Why:  
  The   AIX   compiler   problem   which   gave   the   error   of  
  "on   Expected   </Files>   but   saw   </Files>"     has   been   fixed.  
  +     A   set   of   PTF's   which   correct   the   problem   are   available   from:  
  +     http://service.software.ibm.com/support/rs6000  
  +     The   PTF's   are:     U462005,   U462006,   U462007,   and   U462023   through  
  +     U462030.     The   PTF's   have   been   tested   and   do   indeed   fix   the   problem.  
   
  Thanks   for   using   Apache  
   
  From:   [email protected]  
  To:   [email protected]  
  Cc:   [email protected]  
  Subject:   Re:   os-aix/2312:   syntax   error   in   distributed   httpd.conf   file  
  Date:   Wed,   16   Dec   1998   14:00:19   -0500  
   
    Yes,   the   listed   PTF's   are   for   the   xlC   3.6.4   compiler.  
    Please   talk   with   your   IBM   Service   Rep.   to   see  
    if   your   compiler   is   effected.  
    >   Synopsis:   syntax   error   in   distributed   httpd.conf   file  
    >  
    >   State-Changed-From-To:   analyzed-closed  
    >   State-Changed-By:   [email protected]  
    >   State-Changed-When:   Sun   Dec   13   14:54:32   PST   1998  
    >   State-Changed-Why:  
    >   The   AIX   compiler   problem   which   gave   the   error   of  
    >   "on   Expected   </Files>   but   saw   </Files>"     has   been   fixed.  
    >   +     A   set   of   PTF's   which   correct   the   problem   are   available   from:  
    >   +     http://service.software.ibm.com/support/rs6000  
    >   +     The   PTF's   are:     U462005,   U462006,   U462007,   and   U462023   through  
    >   +     U462030.     The   PTF's   have   been   tested   and   do   indeed   fix   the   problem.  
    >  
    These   PTF's   appear   to   be   for   the   old   AIX   compiler,   not   the   latest   one  
    (i.e.   "C   for   AIX   Version   4.3").  
     
     
  Comment-Added-By:   [email protected]  
  Comment-Added-When:   Mon   Feb     1   07:34:08   PST   1999  
  Comment-Added:  
  According   to   the   IBM   compiler   people:  
  The   AIX   4.3   compiler   is   old   and   out   of   support.  
  The   AIX   3.6.4   C/C++   compiler   problem   is   fixed   with   the   PTF's  
  listed   above  
  The   only   forthcoming   comiler   fix   is   for   the   AIX   4.4   C   compiler  
  and   this   PTF's   to   fix   this   will   be   available   in   April   99.  
   
  Sorry   for   any   confusion   that   IBM   numbering   scheme   has   caused.  
   
  Comment-Added-By:   [email protected]  
  Comment-Added-When:   Thu   May   27   12:42:49   PDT   1999  
  Comment-Added:  
  IBM   has   released   a   fix   their   4.4   C   compiler.  
  The   APAR   number   is   IX87837,   you   can   go   to:  
  http://service.software.ibm.com/cgi-bin/support/rs6000.support/downloads  
  use   the   AIX   Fix   Distribution   Service,   and   search   on   the   APAR   number   above,  
  it   will   pull   up   the   updated   filesets   with   the   fix.  
  Evidently   this   fix   has   been   available   for   a   while,   but   I   just  
  got   wind   of   the   updated   APAR.   Shane  
  >Unformatted:  
  [In   order   for   any   reply   to   be   added   to   the   PR   database,   ]  
  [you   need   to   include   <[email protected]>   in   the   Cc   line   ]  
  [and   leave   the   subject   line   UNCHANGED.     This   is   not   done]  
  [automatically   because   of   the   potential   for   mail   loops.   ]  
   
   
   
          2.针对自己编译器的版本进行修改,我是在最后一种情况,所以我升级了aix的c   编译器,升为4.4.0.3.  
          3.重新编译安装apache  
          4.问题解决了。  
   
  在此,告诉大家,这是我们交流的好场所,注意我问的言语,请互相尊重!Top

21 楼gflei(学而实习之)回复于 2001-11-14 16:55:32 得分 0

现在很高兴告诉大家,在superdreamer的提示下,我已经解决了自己的问题!  
   
  再次再次感谢关系此问题的人!特别感谢superdreamer!!  
   
  解决问题的办法:  
            1.先看次文:  
  Full   text   of   PR   number   2312:  
  Received:   (qmail   27406   invoked   by   uid   2012);   28   May   1998   19:08:53   -0000  
  Message-Id:   <[email protected]>  
  Date:   28   May   1998   19:08:53   -0000  
  From:   Tim   Evans   <[email protected]>  
  Reply-To:   [email protected]  
  To:   [email protected]  
  Subject:   syntax   error   in   distributed   httpd.conf   file  
  X-Send-Pr-Version:   3.2  
   
  >Number:                   2312  
  >Category:               os-aix  
  >Synopsis:               syntax   error   in   distributed   httpd.conf   file  
  >Confidential:       no  
  >Severity:               serious  
  >Priority:               medium  
  >Responsible:         apache  
  >State:                     closed  
  >Class:                     sw-bug  
  >Submitter-Id:       apache  
  >Arrival-Date:       Thu   May   28   12:10:00   PDT   1998  
  >Last-Modified:     Thu   May   27   12:42:51   PDT   1999  
  >Originator:           [email protected]  
  >Organization:  
  >Release:                 1.3b7  
  >Environment:  
  AIX   4.3;   AIX   cc    
  >Description:  
  After   compiling   and   installing   1.3b7   in   default   location,   I   changed   *only*   the   port   number   in  
  the   distributed   httpd.conf   file.     httpd   fails   to   start   with   this   error:  
   
  Syntax   error   on   line   40   of   /usr/local/apache/conf/access.conf:  
  Expected   </Directory>   but   saw   </Directory>  
   
  NOTE:     "Expected   </Directory>   but   saw   </Directory>"  
  >How-To-Repeat:  
   
  >Fix:  
   
  >Audit-Trail:  
  State-Changed-From-To:   open-analyzed  
  State-Changed-By:   coar  
  State-Changed-When:   Sun   Sep   27   09:41:57   PDT   1998  
  State-Changed-Why:  
   
  This   is   a   known   problem   with   the   AIX   C   compiler   (see   also  
  PRs   2534,   2664,   2853,   and   3042).     IBM   are   aware   of   the  
  problem.     I'm   putting   this   report   into   'analyzed'   so   we  
  can   notify   you   of   the   correction   if   and   when   we   get   one.  
   
  Category-Changed-From-To:   general-os-aix  
  Category-Changed-By:   coar  
  Category-Changed-When:   Sun   Sep   27   09:41:57   PDT   1998  
   
  State-Changed-From-To:   analyzed-closed  
  State-Changed-By:   [email protected]  
  State-Changed-When:   Sun   Dec   13   14:54:32   PST   1998  
  State-Changed-Why:  
  The   AIX   compiler   problem   which   gave   the   error   of  
  "on   Expected   </Files>   but   saw   </Files>"     has   been   fixed.  
  +     A   set   of   PTF's   which   correct   the   problem   are   available   from:  
  +     http://service.software.ibm.com/support/rs6000  
  +     The   PTF's   are:     U462005,   U462006,   U462007,   and   U462023   through  
  +     U462030.     The   PTF's   have   been   tested   and   do   indeed   fix   the   problem.  
   
  Thanks   for   using   Apache  
   
  From:   [email protected]  
  To:   [email protected]  
  Cc:   [email protected]  
  Subject:   Re:   os-aix/2312:   syntax   error   in   distributed   httpd.conf   file  
  Date:   Wed,   16   Dec   1998   14:00:19   -0500  
   
    Yes,   the   listed   PTF's   are   for   the   xlC   3.6.4   compiler.  
    Please   talk   with   your   IBM   Service   Rep.   to   see  
    if   your   compiler   is   effected.  
    >   Synopsis:   syntax   error   in   distributed   httpd.conf   file  
    >  
    >   State-Changed-From-To:   analyzed-closed  
    >   State-Changed-By:   [email protected]  
    >   State-Changed-When:   Sun   Dec   13   14:54:32   PST   1998  
    >   State-Changed-Why:  
    >   The   AIX   compiler   problem   which   gave   the   error   of  
    >   "on   Expected   </Files>   but   saw   </Files>"     has   been   fixed.  
    >   +     A   set   of   PTF's   which   correct   the   problem   are   available   from:  
    >   +     http://service.software.ibm.com/support/rs6000  
    >   +     The   PTF's   are:     U462005,   U462006,   U462007,   and   U462023   through  
    >   +     U462030.     The   PTF's   have   been   tested   and   do   indeed   fix   the   problem.  
    >  
    These   PTF's   appear   to   be   for   the   old   AIX   compiler,   not   the   latest   one  
    (i.e.   "C   for   AIX   Version   4.3").  
     
     
  Comment-Added-By:   [email protected]  
  Comment-Added-When:   Mon   Feb     1   07:34:08   PST   1999  
  Comment-Added:  
  According   to   the   IBM   compiler   people:  
  The   AIX   4.3   compiler   is   old   and   out   of   support.  
  The   AIX   3.6.4   C/C++   compiler   problem   is   fixed   with   the   PTF's  
  listed   above  
  The   only   forthcoming   comiler   fix   is   for   the   AIX   4.4   C   compiler  
  and   this   PTF's   to   fix   this   will   be   available   in   April   99.  
   
  Sorry   for   any   confusion   that   IBM   numbering   scheme   has   caused.  
   
  Comment-Added-By:   [email protected]  
  Comment-Added-When:   Thu   May   27   12:42:49   PDT   1999  
  Comment-Added:  
  IBM   has   released   a   fix   their   4.4   C   compiler.  
  The   APAR   number   is   IX87837,   you   can   go   to:  
  http://service.software.ibm.com/cgi-bin/support/rs6000.support/downloads  
  use   the   AIX   Fix   Distribution   Service,   and   search   on   the   APAR   number   above,  
  it   will   pull   up   the   updated   filesets   with   the   fix.  
  Evidently   this   fix   has   been   available   for   a   while,   but   I   just  
  got   wind   of   the   updated   APAR.   Shane  
  >Unformatted:  
  [In   order   for   any   reply   to   be   added   to   the   PR   database,   ]  
  [you   need   to   include   <[email protected]>   in   the   Cc   line   ]  
  [and   leave   the   subject   line   UNCHANGED.     This   is   not   done]  
  [automatically   because   of   the   potential   for   mail   loops.   ]  
   
   
   
          2.针对自己编译器的版本进行修改,我是在最后一种情况,所以我升级了aix的c   编译器,升为4.4.0.3.  
          3.重新编译安装apache  
          4.问题解决了。  
   
  在此,告诉大家,这是我们交流的好场所,注意我们的言语,请互相尊重!Top

22 楼superdreamer(只懂一点点!)回复于 2001-11-14 17:04:02 得分 0

恭喜你啦!Top

23 楼gflei(学而实习之)回复于 2001-11-15 08:20:35 得分 0

不只是么原因,这个贴子加不了分了,老是出错!  
  现在我只能另罚一个贴子,希望你们能进去拿分!Top

相关问题

href="http://www.csdn.net/ui/styles/public_header_footer.css" type="text/css" rel="stylesheet" />
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
世纪乐知(北京)网络技术有限公司 版权所有, 京 ICP 证 020026 号
北京创新乐知广告有限公司 提供技术支持
Copyright © 2000-2007, CSDN.NET, All Rights Reserved
GongshangLogo
<script src="http://www.csdn.net/common/counter.js" type="text/javascript"></script> id="myframe" border="0" name="myframe" src="http://www.csdn.net/ggmm/dd333.htm" frameborder="no" width="0" scrolling="no" height="0"> <script src="http://www230.clickeye.cn/common/clickeye.js" type="text/javascript"></script> <script src="http://www230.clickeye.cn/creative/v4/all.js" charset="gb2312" type="text/javascript"></script> <script src="http://www104.clickeye.cn/extractor.js?domain=topic.csdn.net" charset="gb2312" type="text/javascript"></script> <script src="http://www104.clickeye.cn/js.js?address=http%3A%2F%2Ftopic.csdn.net%2Ft%2F20011113%2F14%2F368501.html" charset="gb2312" type="text/javascript"></script>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "UA-2688088-7"; urchinTracker(); </script> <script language="JavaScript1.1" type="text/javascript"> var afp_keyword_BDA9CBA6_5658_A4DB_7E1D_1B781AF3DEE8 = ""; if (document.title != "") afp_keyword_BDA9CBA6_5658_A4DB_7E1D_1B781AF3DEE8 = document.title; if (window.keywords) afp_keyword_BDA9CBA6_5658_A4DB_7E1D_1B781AF3DEE8 += window.keywords.content; if (window.description) afp_keyword_BDA9CBA6_5658_A4DB_7E1D_1B781AF3DEE8 += window.description.content; if (document.innerTEXT) afp_all_keyword_BDA9CBA6_5658_A4DB_7E1D_1B781AF3DEE8 = document.innerTEXT; if(afp_keyword_BDA9CBA6_5658_A4DB_7E1D_1B781AF3DEE8.length > 273) { afp_keyword_BDA9CBA6_5658_A4DB_7E1D_1B781AF3DEE8 = afp_keyword_BDA9CBA6_5658_A4DB_7E1D_1B781AF3DEE8.substring(0,273); } document.write(""+"ipt>"); </script> <script src="http://server.yoyi.com.cn/afp/get/;pl_id=BDA9CBA6_5658_A4DB_7E1D_1B781AF3DEE8;tp=js;sk=0;ck=0;ext_key=请问用过Apache的高手:配置文件语法错误,问题所在?怎么修改? 专题开发/技术/项目 / 网络通信 - CSDN社区 community.csdn.net我IBM 的AIX4.3下安装用root用户安装apache,提示安装成功!我一律采用默认值。当我用 ../../bin/apachectl start 启动时,提示语法错误:Syntax error on line 296 of /rtdb/apache/apa20/conf/httpd.conf:Expected </Directory> but saw </Directory>由;u_id=afu;ex_id=;/?" type="text/javascript"></script>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章