0

我正在尝试在 Apache 2.4.37 和 Centos 8 上使用 mod_fcgi 启动并运行 Request Tracker。

httpd 服务将无法启动,因为它抱怨 IfVersion 语法不正确......但是从研究来看,这对我来说似乎是正确的,并且直接来自 RT 网站(https://docs.bestpractical.com/rt/4.4. 2/web_deployment.html#Apache )

为什么 httpd 无法启动...?

实际错误:<IfVersion takes one, two or three arguments, a comparison operator, a version (and a delimiter)>

Jan 12 13:47:45 rt.testdomain.ca httpd[3421]: httpd: Syntax error on line 356 of /etc/httpd/conf/httpd.conf: Syntax error on line 17 of /etc/httpd/conf.d/techsupport.testdomain.ca.conf: <IfVersion takes one, two or three arguments, a comparison operator, a version (and a delimiter)>
Jan 12 13:47:45 rt.testdomain.ca systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Jan 12 13:47:45 rt.testdomain.ca systemd[1]: httpd.service: Failed with result 'exit-code'.
Jan 12 13:47:45 rt.testdomain.ca systemd[1]: Failed to start The Apache HTTP Server.

虚拟主机文件如下所示:

<VirtualHost techsupport.testdomain.ca:8080>
        ### Optional apache logs for RT
        # Ensure that your log rotation scripts know about these files
        # ErrorLog /opt/rt4/var/log/apache2.error
        # TransferLog /opt/rt4/var/log/apache2.access
        # LogLevel debug

        AddDefaultCharset UTF-8

        ScriptAlias / /opt/rt4/sbin/rt-server.fcgi/

        DocumentRoot "/opt/rt4/share/html"
        <Location "/">
            <IfVersion >= 2.4>
               Require all granted
            </IfVersion>
            <IfVersion < 2.4>  # For Apache 2.2
                Order allow,deny
                Allow from all
            </IfVersion>

            Options +ExecCGI
            AddHandler fcgid-script fcgi
        </Location>
    </VirtualHost>
4

1 回答 1

0

对于 Apache 2.2

我相信评论不是有效的语法,可以删除

于 2020-02-09T04:23:16.317 回答