Content
Problem: There is a SSL redirect, and error, on new docker installation
Added by Torsten Wagner over 2 years ago
Hi,
Preamble:
Trying out openproject for the first time, I followed the docker installation pathways (both). Using the provides docker-compose file as well as the single container solution. Everything seems to run through, docker starts all containers and the logs do not show anything suspicious. However, trying to access localhost:8080 or IP:8080 I get a SSL error and different brothers directly switch to https, even if I explicitly ask to open http. I tried to get around this in the browsers but nothing works. One particular error message points me to the fact that the browser expected an SSL connection but a plain HTTP response was sent.
As all this happened locally on my PC, tested in two entirely different network settings (home and work) I can assume that is has nothing to do with my network configuration, router, firewall, or whatever.
All searches in this direction lead to no results.
So:
Problem:
The current docker-compose set-up of openproject redirects to HTTPS but provides only HTTP content.
Solutions tried:
Force browsers to use HTTP, use different networks, a curl response shows:
curl -v **http://localhost:8080**
* Trying 127.0.0.1:8080...
* Connected to localhost (127.0.0.1) port 8080 (#0)
> **GET / HTTP/1.1**
> Host: localhost:8080
> User-Agent: curl/7.84.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 301 Moved Permanently
< Date: Wed, 17 Aug 2022 08:24:11 GMT
< Server: Apache/2.4.38 (Debian)
< Content-Type: text/html
**< Location: https://localhost:8080/**
< X-Frame-Options: SAMEORIGIN
< X-Content-Type-Options: nosniff
< X-XSS-Protection: 1; mode=block
< X-Download-Options: noopen
< X-Permitted-Cross-Domain-Policies: none
< Referrer-Policy: origin-when-cross-origin
< Content-Security-Policy: default-src 'self'; base-uri 'self'; connect-src 'self' https://augur.openproject.com; font-src 'self' data:; form-action 'self'; frame-ancestors 'self'; frame-src 'self' https://player.vimeo.com https://releases.openproject.com/v1/check.svg; img-src * data: blob:; object-src https://releases.openproject.com/v1/check.svg; script-src 'self'; style-src 'self' 'unsafe-inline'
< Content-Length: 0
<
* Connection #0 to host localhost left intact
I marked bold, what makes me wondering.
Any ideas?
Replies (4)
I am new to OpenProject too and just spent several hours debugging this. I did the following to fix the issue:
Set the following environment variables:
Clear browser cache!!!! <--- this was my problem for HOURS.
Hope that helps.
Sean Connally wrote:
That's will work on which installation method, one container per process, all-in-one container, or both?
What I need to do is just add the two lines of code to
.env.example
, right? And rename_.env.example_
to.env
?please share what you tried and share which error you got
This is true and help solved my problem. Addition, you could open your browser in incognito-mode.
Cheers 🥂 mate.
Sean Connally wrote: