0

Am not able to get dispatcher working on my Ubuntu machine, following is the error that I get after apache restart

Syntax error on line 2 of /etc/apache2/conf.d/dispatcher.any: Invalid command '/farms', perhaps misspelled or defined by a module not included in the server configuration Action 'configtest' failed.

Am using the default dispatcher.any file without any changes.

I've enabled the dispatcher module as below:

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>

Can anyone please help me out in resolving the issue?

Thanks, -- Pawan

user1764832
  • 69
  • 3
  • 8

1 Answers1

2

Move dispatcher.any out of conf.d/ and into conf/ and update DispatcherConfig

What happens is, when apache starts up it goes through the conf.d directory and tries to load the files contained within as apache configuration files. The dispatcher.any file is not an apache configuration file and cannot be loaded as such. This causes the syntax error on the first non-comment line of the file.

kfaerber
  • 1,327
  • 8
  • 10