23.07.2024 – Linux/Fix_OpenProject_Invalid_host-name.md

Fix OpenProject “Invalid host_name”

Starting with OpenProject 14.3, hostname checking has become more strict (see config/environments/production.rb:182 ff.). When running OpenProject behind an Apache reverse proxy, requests may arrive with different source hostnames. By default, the OPENPROJECT_HOST__NAME environment variable is only set to the public hostname served by Apache. To resolve this issue, add:

1
ProxyPreserveHost on

to your Apache VirtualHost configuration and reload the service:

1
$ sudo systemctl reload apache2.service

Alternatively, you can work around this issue by adding:

1
export OPENPROJECT_ADDITIONAL__HOST__NAMES=["127.0.0.1:6000"]

to /etc/openproject/conf.d/other and then run:

1
$ sudo openproject configure

to apply the changes. After this, restart OpenProject.