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?
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
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.