how to replace old domain name with new domain name ?
hello everyone
I have to change the domain name, but right now I can do not know how to do it. I tried a few times, but failed,Could you please give me an example.
thanks.
Hi @wade-liwei , you need to start container with setting GITLAB_HOST environment variable like : docker run --name gitlab --env 'GITLAB_HOST=gitlab.example.com' sameersbn/gitlab:latest
If you need more help, could you please provide more detail?
We don't know how you have set up your environment (docker-compose or Kubernetes are commonly used).
One of most easiest way to show us your environment is to provide your configuration file (docker-compose.yml for docker-compose, gitlab-rc.yml for Kubernetes).
Please note that we have no interest in how many times you've tried. We only interest in what exactly you've tried (e.g. modified GITLAB_HOST variable in docker-compose.yml from "GITLAB_HOST: gitlab-before.example.com" to "GITLAB_HOST: gitlab-after.example.com" , ran docker-compose stop gitlab, docker-compose rm gitlab then ran docker-compose up -d gitlab).
Best,
Hi @kkimurak
Thank you help me.
- we run gitlab with docker-compose;
- I just tried your introduction, but failed. (modified GITLAB_HOST variable in docker-compose.yml from "GITLAB_HOST: gitlab-before.example.com" to "GITLAB_HOST: gitlab-after.example.com" , ran docker-compose stop gitlab, docker-compose rm gitlab then ran docker-compose up -d gitlab)
My ENV:
- resolved old domain name to the old machine IP.
- imported the code backup file from old machine into the new machine.
- resolved new domain name to the new machine IP.
- access the new domain name, redirected to the old domain name.
- right now, I resolve the old domain name to new machine IP, but I just want to only use new domain name.
there are NGINX before gitlab on the old and new machine.
docker-compose.yml on the new machine
- GITLAB_HTTPS=true
- SSL_SELF_SIGNED=false
- GITLAB_HOST=localhost # default(localhost) or the new domain name, I always get the same result.
Hello, sorry for being late. Thank you for your report. I understand a little about what you want to do.
On new machines, I think it's okay to set GITLAB_HOST to the new domain name.
I have never experienced such a situation, but what is the setting of "NGINX before gitlab"? I personally suspect that if a redirect happens, it's here.