Content
You are here:
HTTPS mode setup mismatch
Added by Tomasz Root over 1 year ago
Using
openproject reconfigure
I enabled SSL in OpenProject.
Also, I have the appropriate entries set in apache.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
DocumentRoot /opt/openproject/public
ServerName xxx.xxx
ServerAlias xxx.xxx www.xxx.xxx
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
</IfModule>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RequestHeader set X-Forwarded-Proto "https"
SSLCertificateFile /etc/letsencrypt/live/xxx.xxx/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/xxx.xxx/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
SSLEngine On
ProxyRequests off
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:6000/ retry=0
ProxyPassReverse / http://127.0.0.1:6000/
</VirtualHost>
</IfModule>
Below the page shows me an error.
HTTPS mode setup mismatch
Your application is running with HTTPS mode set to http, but the request is an https request. This will result in errors! You will need to set the following configuration value: OPENPROJECT_HTTPS=true. Please see the installation documentation on how to set this configuration.
OpenProject works over SSL. I read in the documentation → https://www.openproject.org/docs/installation-and-operations/installation/packaged/, but I don't see where I should enter the value OPENPROJECT_HTTPS=true
?
Replies (5)
Hi Tomasz,
I had the same issues as well in a similar setting. Try this:
After that you also do:
openproject config:set OPENPROJECT_HTTPS="true"
The first action will make sure (as far as I understand it) that OPENPROJECT_HTTPS is always set to true even after reboots or restarting the application. The variable itself, OPENPROJECT_HTTPS, tells OP that is should expect HTTPS connections.
I executed:
openproject config:set SERVER_PROTOCOL_FORCE_HTTPS="true"
Then
openproject configure
and
openproject config:set OPENPROJECT_HTTPS="true"
The problem persists
Only when I ran the restart command did it start working.
openproject restart
@Jan H, hank you for your helping hand :-)
Hi Tomasz,
just to make sure: if you execute
openproject config:get OPENPROJECT_HTTPS
you should find that it is set to true now. If so, I assume your problem should be solved.On a side note: If you executed the commands in the exact same order you list them above, it might be possible (not too sure) that you have to
openproject configure
a second time to put the changes into effect.Jan H wrote:
I also performed
openproject reconfigure
and then restarted.The following fixed it for me: (no restart required)
openproject config:set SERVER_PROTOCOL_FORCE_HTTPS="true"
openproject configure
Thank you. That stupid warning has bugged me for years. Despite this:
Perhaps this phrase "You will need to set the following configuration value: OPENPROJECT_HTTPS=true" should be
"You will need to set the following configuration value: OPENPROJECT_HTTPS=true and/or SERVER_PROTOCOL_FORCE_HTTPS="true"