在ubuntu 12.04上配置调度程序

时间:2013-05-21 12:12:58

标签: dispatcher cq5

无法让调度程序在我的Ubuntu机器上工作,以下是我在重启apache后得到的错误

/etc/apache2/conf.d/dispatcher.any第2行的语法错误: 无效的命令'/ farms',可能由服务器配置中未包含的模块拼写错误或定义 动作'configtest'失败。

使用默认的dispatcher.any文件而没有任何更改。

我已启用调度程序模块,如下所示:

LoadModule dispatcher_module /usr/lib/apache2/modules/dispatcher-apache2.2-4.1.4.so

<IfModule disp_apache2.c>
        # location of the configuration file. eg: 'conf/dispatcher.any'
        DispatcherConfig conf.d/dispatcher.any

        # location of the dispatcher log file. eg: 'logs/dispatcher.log'
        DispatcherLog    /var/log/apache2/dispatcher.log

        # log level for the dispatcher log
        # 0 Errors
        # 1 Warnings
        # 2 Infos
        # 3 Debug
        DispatcherLogLevel 3

        # if turned to 1, the dispatcher looks like a normal module
        DispatcherNoServerHeader 0

        # if turned to 1, request to / are not handled by the dispatcher
        # use the mod_alias then for the correct mapping
        DispatcherDeclineRoot 0

        # if turned to 1, the dispatcher uses the URL already processed
        # by handlers preceeding the dispatcher (i.e. mod_rewrite)
        # instead of the original one passed to the web server.
        DispatcherUseProcessedURL 0

        # if turned to 1, the dispatcher does not spool an error
        # response to the client (where the status code is greater
        # or equal than 400), but passes the status code to
        # Apache, which e.g. allows an ErrorDocument directive
        # to process such a status code.
        DispatcherPassError 0
</IfModule>

有人可以帮我解决这个问题吗?

谢谢, - Pawan

1 个答案:

答案 0 :(得分:2)

dispatcher.any移出conf.d/进入conf/并更新DispatcherConfig

当apache启动时,它会通过conf.d目录并尝试加载apache配置文件中包含的文件。 dispatcher.any文件不是apache配置文件,因此无法加载。这会导致文件的第一个非注释行出现语法错误。