Content
nginx configuration
Added by Philip Deubner about 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