- I have Bitbucket server 7.1.1
- Running on CentOS 7
- Running behind an nginx reverse proxy
- Running on port 7990
- With the baseUrl configured within the settings admin panel
I can access bitbucket through my the web interface by going to the reverse proxied address git.domain.com. When I do, it asks for my login, and then upon successful login, I am redirected to http://localhost:7990.
Then (since I am an admin) I see a warning in the upper right corner that there is a "Base URL mismatch", but when I go to set the base URL, it is already set to git.domain.com.
Finally, when I go to create a new repository and get its URL to clone it for the first time, I see http://localhost:7990/<....>/project.git in the URL instead of the base URL http://git.domain.com/<...>/project.git.
I would guess this all stems from the same issue, but even through searching all of the answers online, I cannot figure out a solution to this problem!
How do I stop it from referencing http://localhost:7990 even when the base URL is configured?
Also, I am not using SSL and do not plan to at this time.
For reference, this is what my reverse proxy nginx script looks like:
server {
server_name git.domain.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;
client_max_body_size 10M;
proxy_connect_timeout 180s;
proxy_send_timeout 180s;
proxy_read_timeout 180s;
}
}