Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

General discussion
  1. OpenProject
  2. Forums
  3. General discussion
  4. HTTPS mode setup mismatch

HTTPS mode setup mismatch

Added by Tomasz Root almost 2 years 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)

RE: HTTPS mode setup mismatch - Added by Jan H almost 2 years ago

Hi Tomasz,

I had the same issues as well in a similar setting. Try this:

Finally, to let OpenProject know that it should create links with ‘https’ when no request is available (for example, when sending emails), you need to set the following setting: openproject config:set SERVER_PROTOCOL_FORCE_HTTPS="true" followed by an openproject configure. This ensures that OpenProject responds correctly with secure cookies even though it was not configured for https in the server configuration.

-- Quote from documentation Install OpenProject with DEB/RPM packages

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.

RE: HTTPS mode setup mismatch - Added by Tomasz Root almost 2 years ago

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 :-)

RE: HTTPS mode setup mismatch - Added by Jan H almost 2 years ago

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.

RE: HTTPS mode setup mismatch - Added by Tomasz Root almost 2 years ago

Jan H wrote:

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.

I also performed openproject reconfigure and then restarted.

RE: HTTPS mode setup mismatch - Added by Brett Blackham over 1 year ago

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"

  • (1 - 5/5)
Loading...