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

Support Installation & Updates
  1. OpenProject
  2. Forums
  3. Support Installation & Updates
  4. Docker-Compose and Nginx for SSL and changed port leads to broken links

Docker-Compose and Nginx for SSL and changed port leads to broken links

Added by Florian L almost 8 years ago

Hey there,

I am currently trying to setup an OpenProject instance to manage a software project at my university.

Requirements are: Use SSL and run on port 4791, also use docker
I realized this with using docker-compose to connect the OpenProject docker image with an nginx image, which is responsible for handling the SSL handshake and act as a reverse proxy.
Generally this setup seems to work fine and OpenProject is reachable at the correct port with SSL. However clicking some links causes my browser to redirect to the standard https port (443) (Due to “proxy_redirect http:// https://;” in the nginx.conf. Without that it redirects to port 80). For example, these links are broken; “Login” and “Logout”, as well as “Timelines”.

For reference, here are my docker-compose.yml and nginx.conf files:

docker-compose.yml:

version: "3"
services:
  openproject:
    image: openproject/community:latest
    volumes:
      - ./pgdata:/var/lib/postgresql/9.4/main
      - ./logs:/var/log/supervisor
      - ./static:/var/db/openproject
  web:
    image: nginx:alpine
    environment:
      SECRET_KEY_BASE: <somesecretkeybase>
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf
      - ./ssl:/etc/nginx/ssl
    ports:
      - "4791:4791"
    depends_on:
      - openproject

nginx.conf:

events {

}

http {
    server {

        listen 4791 ssl;

        ssl_certificate /etc/nginx/ssl/ssl.crt;
        ssl_certificate_key /etc/nginx/ssl/ssl.key;
        ssl_session_cache shared:SSL:10m;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-EDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
        ssl_prefer_server_ciphers on;

        location / {

            proxy_pass http://openproject/;
            proxy_set_header Host $host;
            proxy_redirect http:// https://;
        }
    }
}

I hope you can help me fix the links.

- Florian


Loading...