title: Bitbucket over http nginx proxy
body: <p>I have a bitbucket server that works on a direct IP address very well. But I want to access my bitbucket server using subdomain name and over HTTP, something like bitbucket.subdomain.com</p>
  
  <p>I have found a very good official Atlassian's explanation on how to do it and started from adding new server parameters to the bitbucket.properties</p>
  
  <pre><code>server.port=7990
  server.secure=true
  server.scheme=http
  server.proxy-port=80
  server.proxy-name=bitbucket.mydomain.com
  server.context-path=/
  </code></pre>
  
  <p>everything looks clear to me, so I've decided to change my Nginx configuration and added next server settings</p>
  
  <pre><code>#Bitbucket
  server {
  
      server_name bitbucket.mydomain.com;
  
      # serve static files directly
      #location for bitbucket
  
      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://localhost:7990;
  
      }
  
  
  }
  </code></pre>
  
  <p>the same looks cool for me. </p>
  
  <p>Did all restarts/reload etc and going in my browser to bitbucket.subdomain.com and I see 404</p>
  
  <p>So, I'm really stuck, since I've done a lot of different changes and no, it's not working</p>
  
  <p>Can anyone help? </p>