Apache - httpd не запускается, так как жалуется на неправильный формат IfVersion - как это исправить? - PullRequest
0 голосов
/ 13 января 2020

Я пытаюсь запустить Request Tracker и запустить его с mod_fcgi на Apache 2.4.37 и Centos 8.

Служба 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>

1 Ответ

0 голосов
/ 09 февраля 2020

Для Apache 2.2

Я считаю, что комментарии не являются допустимым синтаксисом и могут быть удалены

...