Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 with relative url root set #10

Closed
JamesStewy opened this issue Nov 27, 2014 · 4 comments
Closed

404 with relative url root set #10

JamesStewy opened this issue Nov 27, 2014 · 4 comments

Comments

@JamesStewy
Copy link

Hi. I am trying to use the GITLAB_CI_RELATIVE_URL_ROOT option to run a Gitlab CI instance at mydomain.com/ci/. I added -e 'GITLAB_CI_HOST=mydomain.com' -e 'GITLAB_CI_RELATIVE_URL_ROOT=/ci' to docker run but when I go to mydomain.com/ci/, nginx returns a 404 error. If it is any help, I used the same configuration (-e 'GITLAB_HOST=mydomain.com' -e 'GITLAB_RELATIVE_URL_ROOT=/git') with your Gitlab image and it worked just fine.

Full run command:
docker run -d -p 80 --link mysql:mysql --link redis:redisio -e 'GITLAB_CI_HOST=mydomain.com' -e 'GITLAB_CI_RELATIVE_URL_ROOT=/ci' -e 'GITLAB_URL=https://mydomain.com/git/' -e 'DB_USER=gitlab_ci' -e 'DB_PASS=xxx' -e 'DB_NAME=gitlab_ci_production' -v /path/to/gitlab-ci/data:/home/gitlab_ci/data sameersbn/gitlab-ci:latest

docker version:

Client version: 1.3.0
Client API version: 1.15
Go version (client): go1.3.3
Git commit (client): c78088f
OS/Arch (client): linux/amd64
Server version: 1.3.0
Server API version: 1.15
Go version (server): go1.3.3
Git commit (server): c78088f

docker info:

Containers: xxx
Images: xxx
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Dirs: 227
Execution Driver: native-0.2
Kernel Version: 3.16.0-0.bpo.2-amd64
Operating System: Debian GNU/Linux 7 (wheezy)

Thanks.

@sameersbn
Copy link
Owner

@JamesStewy I am not having any issues.

# start redis
docker run -it --rm --name=redis-1 sameersbn/redis:latest

# start mysql
docker run -it --rm --name=mysql-1 \
-e DB_USER=gitlab_ci \
-e DB_PASS=password \
-e DB_NAME=gitlab_ci_production \
sameersbn/mysql:latest

# start ci
docker run -it --rm --name=ci-1 -p 80:80 \
--link mysql-1:mysql --link redis-1:redisio \
-e 'GITLAB_CI_HOST=www.example.com' \
-e 'GITLAB_CI_RELATIVE_URL_ROOT=/ci' \
-e 'GITLAB_URL=https://gitlab.com' \
sameersbn/gitlab-ci:latest

make /etc/hosts entry if required, echo "127.0.0.1 www.example.com" >> /etc/hosts

Access http://www.example.com/ci

If you are using a proxy, then please check your configuration.

@JamesStewy
Copy link
Author

Looks like there was a problem with my docker installation as purging and re-installing it fixed the problem. Thanks.

@charles-plessy
Copy link

Hello,

usin sameersbn/gitlab:7.12.0, I get redirected to http://my-ip-address:10080/gitlab/gitlab/users/sign_in (hence 404) when setting GITLAB_RELATIVE_URL_ROOT=/gitlab in the docker-compose.yml file. However, it only happens when I logged in for the first time...

@sameersbn
Copy link
Owner

@charles-plessy gitlab-ci officially does not mention support for setting up gitlab-ci at a relative_root. This was added in this image by a contributor. However I will try to reproduce this issue and hopefully get it fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants