I have the following issue...
A customer has a bitbucket server and moved to another domain this year.
Of coure he'd like to use a new subdomain for bitbucket.
let's say his old domain was old.red-company.com/bitbucket
and the new he'd like to use is new.blue-company.com
Although I changed and edited the configuration on the Proxy Server, the domain new.blue-company.com ALWAYS redirects me to old.red-company.com/bitbucket.
We also checked the Domain settings at their hoster because we though it might be a redirect there, but no, nothing.
Then I noticed that if I try to open bitbucket with <internalserverip>:7990/bitbucket
it is redirecting over and over again to old.red-company.com/bitbucket
I have no clue what this might be and I assume it's some kind of configuration on the bitbucket server itself. Any ideas or solutions for this?
I'm experiencing the exact same issue right now
seems like something is cached somewhere even though all the configs and properties are set correctly as suggested in the docs
how to prevent this 302?
I found my issue:
SERVER_PROXY_NAME environment variable was still set to old hostname (as I'm using Docker)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Paul,
You may need to check the file shared/server.xml or shared/bitbucket.properties
Martin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
can you check that you have correctly set the Base URL as shown here: https://confluence.atlassian.com/bitbucketserver/specifying-the-base-url-for-bitbucket-server-776640392.html
It should work fine if you have new.blue-company.com set here.
Let me know if it works,
Cheers,
-- Alexis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alex,
thank you for your reply!
Yes, I already checked this an the new URL is already set there, but it still redirects to the old one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Paul,
can you check with Chrome devtools what is happening in terms of redirections when you go to new.blue-company.com ? You can access this tool simply by Right-Click -> Inspect and then select Network tab and load new.blue-company.com
Cheers,
--Alexis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alexis,
sorry for misspelling your name in my first reply.
Since I don't use Chrome I tried this with Firefox.
I tried the the old address, the new and the IP of the Bitbucket Server itself, this is what I got.
When I access new.blue-company.com:
1. new.blue-company.com connects to the external IP of my reverse Proxy
2. reverse proxy answers with "Location: https://old.red-company.com/bitbucket/projects"
When I access old.red-company.com/bitbucket:
1. old.red-company.com/bitbucket connects to the external IP of my reverse Proxy
2. reverse proxy answers with "Location: https://old.red-company.com/bitbucket/"
When I access <internalIP>:7990/bitbucket:
1. <internalIP>:7990/bitbucket connects to the internal IP of the Bitbucket server itself
2. Bitbucket server answers with "Location: https://old.red-company.com/bitbucket/"
I hope this Info helps. If not, let me know what exactly you have to know.
Have a nice day,
Paul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
do you see any specific HTTP code with the analysis tool ? something like HTTP 302 for example.
A test that you could do is change the Bitbucket base URL to the IP address and check that you're not redirected in this case.
Cheers,
--Alexis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
yes, I get in all three cases a 302 redirect.
I changed the base URL to the servers IP address, but still the same behavior with the old and new URL and also same with the servers IP address.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
if you get 302 redirect then there is somewhere a configuration that forces new.blue-company.com to redirect to old.red-company.com
Maybe something that was set up before you switched to this new domain, but I would advise to check with your IT team to find out. You will need to investigate this issue but I think Bitbucket is configured correctly so this is purely network related.
Cheers,
--Alexis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alexis,
there is a reverse Proxy and a AD Master Server which provides DNS.
I don't think it's a network issue because of the following reasons:
1. The reverse Proxy is configured correctly (we checked this multiple times)
2. There is no DNS Entry for the old domain on the AD Master Server
3. The NS Entries for the new domain are also correct since they point to the external IP of the reverse Proxy
4. The redirect also happens when the Bitbucket server is accessed directly via its internal IP and without using the reverse Proxy
The redirect somehow happens on the Bitbucket server itself, but I have no clue where and why.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.