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

NGINX Reverse Proxy keeps giving 504 error

I tried to set up Bitbucket Server, and I successfully did. However, when I tried to put it behind an Nginx reverse proxy, I kept getting a 504 Gateway Time-out error.

My bitbucket.properties file:

server.port=7990
server.secure=true
server.scheme=https
server.proxy-name=code.example.com
server.context-path=/
server.proxy-port=443

My Nginx conf file:

server {
server_name code.example.com
listen 80;

location / {
proxy_pass http://localhost:7990;
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_set_header X-Real-IP $remote_addr;
proxy_redirect off;
}
}

Would anyone have any idea on how to fix this?

1 answer

0 votes

Hi Luna,

My hunch is that nginx is being redirected by Bitbucket Server and thus fails.

Try changing the bitbucket.properties file as follows:

server.secure=false

server.scheme=http

server.proxy-port:80

This is based on the fact that there seems to be no SSL configuration in your nginx config and thus it won't listen on port 443.

Restart Bitbucket Server and see if that helps.

Cheers,

Christian

Premier Support Engineer

Atlassian

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Calling any interview participants for Bitbucket Data Center

Hi everyone,  We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...

474 views 5 4
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