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. nginx configuration

nginx configuration

Added by Philip Deubner over 8 years ago

Dear all,

I want to use OP 6.0.4 on a Debain based NAS (Openmediavault) for our team. OP should be accessible by using http://IP:8080. The installation was performed by the installer package. When configuring it, I simply skipped the Apache part.

As I need to use nginx for this (which I am not really good at), I am struggling with the configuration.
According to this post, I need to add

location ~ ^/openproject(/.*|$) {
    proxy_pass_request_headers on;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Server $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass http://127.0.0.1:6000;
}

to the nginx configuration file.
By adding the other “stuff”, it looks like:

#upstream app_server {
#    server 127.0.0.1:3000 fail_timeout=0;
#}

server {
    listen 8080;
    server_name 192.168.1.11;
    root /opt/openproject/public;

location ~ /opt/openproject/public(/.*|$) {
    proxy_pass_request_headers on;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Server $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass http://127.0.0.1:6000;
}


#     location / {
#           try_files $uri/index.html $uri.html $uri @app;
#     }
#
#    location @app {
#            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#            proxy_set_header Host $http_host;
#            proxy_redirect off;
#            proxy_pass http://app_server;
#    }
}

The uncommented lines were taken from a suggestion on DigitalOcean.
Unfortunately, this setting causes a 403. The error.log says:
2016/10/16 11:51:07 [error] 7755#0: *11 directory index of "/opt/openproject/public/" is forbidden, client: IP, server: IP, request: "GET / HTTP/1.1", host: "IP:8080"

I would be very grateful for any suggestion.
Thank you in advance,

Philip


Loading...