Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Confluence-server (docker) + reverse nginx + cloudflare = 502 bad gateway

Hi All

Im struggling with this issue since a few hours... I keep getting "Bad gateway 502"

/etc/hosts

127.0.0.1 confluence

Nginx

server {
#ipv4
listen 80;
listen 443 ssl http2;
#ipv6
listen [::]:443 ssl http2;

server_name wiki.xxxxxx.xx;
proxy_read_timeout 600s;
location / {
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://confluence:8090;
client_max_body_size 50M;
}
}

Docker

docker run -e JVM_MINIMUM_MEMORY=2048m \
-e JVM_MAXIMUM_MEMORY=8192m \
-e ATL_PROXY_NAME=wiki.xxxxxx.xx \
-e ATL_PROXY_PORT=443 \
-e ATL_TOMCAT_SCHEME=https \
-e VIRTUAL_PORT=8090 \
-v /home/confluence:/var/atlassian/application-data/confluence \
--name="confluence" -d \
--network atlassian \
-p 8090:8090 -p 8091:8091 \
atlassian/confluence-server

Cloudflare

Running on free account, DNS is used beside CDN

Tested

  • DNS point to right server
  • ip address of wiki.xxxxxx.xx, https://ipadress:8090 let me access confluence (I did open firewall port 8090 on ipserver)

Any ideas what would be wrong?

 

1 answer

0 votes
Daniel Eads Atlassian Team Sep 16, 2020

Hi Cedric,

Just curious if you'd sorted this out already or if it's still throwing 502 errors.

I did see something interesting between your test and configuration:

https://ipadress:8090 let me access confluence

Not sure if that was a typo, but you've told nginx that it should forward requests to Confluence over HTTP, but if it's working with the address you mentioned, that means Confluence is serving HTTPS over that port instead. This would throw a protocol mismatch at nginx, and result in a 502.

If you're still stuck and that was in fact a typo (or you're seeing something else now), please let me know and we can work together to troubleshoot!

Cheers,
Daniel

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
Community showcase
Published in Confluence

Announcing Team Calendars in Confluence Data Center

Hi Community! We're thrilled to share that Team Calendars for Confluence is now a built-in feature for Confluence Data Center releases 7.11 and beyond.  A long time favorite,  Team Cale...

82 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you