4

I have a Ubuntu Server (16.04.3 LTS) with Apache 2.4.18 and redmine installed, following this installation guide.

Therefor I edited the ssl.conf in my apache2/sites-available and added those lines:

<IfModule mod_ssl.c>
  <VirtualHost _default_:443>
   ...

    <Directory /var/www/html/redmine>
      RailsBaseURI /redmine
      PassengerResolveSymlinksInDocumentRoot on
    </Directory>

  </VirtualHost>
</IfModule>

This used to be working for several months, but today I edited the ssl.conf to add another location. Now the Apache restart fails and systemctl status apache2.service shows the following error message:

Invalid command 'PassengerResolveSymlinksInDocumentRoot', perhaps misspelled or defined by a module not included in the server configuration

Neither did I change anything in the redmine part of ssl.conf nor did I enable or disable any Apache modules.

Even reverting the changes doesn't help avoiding this error message.

Commenting PassengerResolveSymlinksInDocumentRoot makes Apache work again, but disables the redmine installation.

passenger-config validate-install returns zero errors if the line is commented, and 'Your Apache installation might be broken' if the line is uncommented.

Is there any way to fix this or are there any other files I should check to fix this error?

LKKP4ThX
  • 143
  • 1
  • 4

1 Answers1

9

I have managed to resolve the issue

PassengerResolveSymlinksInDocumentRoot

This option has been removed in 5.2.0 version according to

https://blog.phusion.nl/2018/01/29/passenger-5-2-0/

So there are 2 ways to fix it

1.Don't use symbol links in DocumentRoot

2.Use parameter PassengerAppRoot in virtual host Apache(if you use symbol link in DocumentRoot)

<VirtualHost *:443>
    ServerName myservername
    DocumentRoot /var/www/redmine
    PassengerAppRoot /opt/redmine/redmine
…
</VirtualHost>

# ls -l /var/www/redmine
lrwxrwxrwx 1 root root 27 Apr 27  2017 /var/www/redmine -> /opt/redmine/redmine/public