0

I'm trying to get Request Tracker up and running with mod_fcgi on Apache 2.4.37 and Centos 8.

The httpd service will not start as it's complaining about IfVersion syntax not being correct... however from research it seems correct to me, and is taken straight from the RT website ( https://docs.bestpractical.com/rt/4.4.2/web_deployment.html#Apache )

Why won't httpd start...?

actual error: <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.

The virtual host file looks like this:

<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>
Jacksporrow
  • 239
  • 5
  • 10
  • as a workaround, removing the IfVersion sections worked and keeping 'Require all granted' worked. Would still like to know what the apache error is though. – Jacksporrow Jan 12 '20 at 23:00

1 Answers1

0

For Apache 2.2

I believe the comments are not valid syntax and can be removed

  • I am afraid Craig is correct. See this thread: https://stackoverflow.com/questions/50084211/how-to-add-comment-in-apache-httpd-conf-not-as-a-complete-line . You normally can not have comments in the middle of the line in Apache 2.2. – Houmles Feb 17 '20 at 20:57