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. OpenProject URLs

OpenProject URLs

Added by Dirk Hildebrand over 5 years ago

Hi,

i installed openProject to a Ubuntu 18.04 LTS Server and made it available to the internet through a nginx reversproxy. My Problem now is, that some Links in OpenProject are set to the internal IP Adress and not to the Public URL, so that People from the outside cant open them., e.g. the Administrator can not open the Admin Page, because the URL of the link is http://internalip/admin instead of https://publicdomain.tld/admin or when you click on the OpenProject Logo in the Top center of the Page you are send to http://internalip instead of https://publicdomain.tld/

Where can i change that behavior?

Regards

Dirk


Replies (3)

RE: OpenProject URLs - Added by Dirk Hildebrand over 5 years ago

I guess i found it. In my Nginx settings was the 

proxy_set_header Host $host;

missing. Now it seems to be fixed.

Regards

Dirk

RE: OpenProject URLs - Added by Oliver Günther over 5 years ago

Hi Dirk,

yes the proxy settings needs to forward the Host value if the system does not know it by itself. There are two places in OpenProject where this is relevant:

  1. URLs generated from the current request (i.e. as a response to your browser's request). In this case, the HOST value from the request is being used to generate the URLs, which is why you need to set the proxy_set_header (or ProxyPreserveHost in Apache2). The same goes for HTTPS state forward if you terminate TLS/SSL on your nginx. You will then need to set the X-Forwarded-Proto https header to ensure the proxied server is notified about being in an TLS/SSL request to properly use https:// scheme.
  2. URLs generated in background mails, such as notification mails, use our own Setting.protocol and Setting.host_name values that you can control in the Administration > System settings. In packaged installations, these values are being taken automatically from the values input in the configuration wizard.

I hope that clears up why both are needed.

Best,

Oliver

RE: OpenProject URLs - Added by Dirk Hildebrand over 5 years ago

Hey,

thank you for you reply. I guess i fixed it. This is my full nginx config:

server {

       listen       *:80;
       server_name project.domain.tld;

       if ($host =project.domain.tld) {
               return 301 https://$host$request_uri/;
       }
       return 404;
}

server {
       server_name project.domain.tld;
       error_log  /var/log/nginx/cloud-error.log;
       access_log /var/log/nginx/cloud-access.log;
       listen 443 ssl;
       ssl_certificate /etc/letsencrypt/live/project.domain.tld/fullchain.pem;
       ssl_certificate_key /etc/letsencrypt/live/project.domain.tld/privkey.pem;
       include /etc/letsencrypt/options-ssl-nginx.conf;
       ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
       ssl_verify_client off;

       # Set global proxy settings

       proxy_read_timeout      360;
       location /            {
                               proxy_pass_request_headers on;
                               proxy_set_header X-Forwarded-Host $host:$server_port;
                               proxy_set_header X-Forwarded-Server $host:$server_port;
                               proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                               proxy_pass http://192.168.0.1;
                               proxy_set_header Host $host;}
}
  • (1 - 3/3)
Loading...