Content
You are here:
OP behind a reverse proxy
Added by Martin Kurz almost 8 years ago
I’m having problems getting OP working properly behind a reverse proxy (apache 2.4). In general the pages are showing but Timelines and Avatars won’t work (http:// not being rewritten to https://).
Setup is as follows:
client ——> https ——> reverse proxy ——> http ——> OP
Problem seems to me somehow apache-related.
Tried several things with rewriting and proxy_html. So far no success.
Anybody having solved this skind of problem already? Help greatly appreciated.
Replies (4)
Hi Martin,
do you set the
X-FORWARDED-PROTO
header in your apache configuration? Our packaged installation does that automatically when choosing to terminate SSL at the Apache server.Also, some URLs are not correctly promoting the url helper in a proxy environment. See this bug for instance.
I can’t tell if that affects your case, though.
The patch is available at https://github.com/opf/openproject/pull/5183.patch and will be made part of 6.1.5 (yet unreleased).
Best,
Oliver
Hi Oliver,
thank you for the hint!
Setting X-Forwarded-Proto to https solved all of the problems but one:
Coming across the reverse proxy and looking for activities and user documents the links shown still won’t get mapped correctly:
Opening e.g. https://project.mysite.org:59444/users/10 yields html reading
while one would have expected sth. like
Still trying to fix this one…..
regards,
Martin
That should be fixed with the patch I wrote about in my previous post. You can apply it to your installation. Also, It will be part of 6.1.5 released probably next week.
Best,
Oliver
Hi Martin! I solved this by switching to NGINX as a reverse proxy, so my scenario is:
Internet <--https--> NGINX <--http--> OpenProject server.
On NGINX in a linux server, the firewall only allows connection from any IP to port 443. In my Open Project server the Linux firewall only allows connections from NGINX IP to OpenProject IP on port 80, nothing else.
At the Open Project server is set up with the defaults on the wizard with sudo openproject configure. That being Apache as a internal reverse-proxy for the Open Project Service.
My NGINX config is: