apache - Gitlab docker behind proxy - relative path problems -


i trying gitlab running te following setup:

  • in docker (using gitlab/gitlab-ce:latest , docker-compose)
  • on relative path https://my.domain.com/git
  • behind proxy (apache) handles ssl.

i tried many different configs, keep failing running correctly behind proxy. seems gitlab ignores relative path. according https://docs.gitlab.com/omnibus/settings/configuration.html should work. tried old environment option gitlab_relative_url_root: '/git', didn't change anything.

docker-compose.yml looks this:

web:   image: 'gitlab/gitlab-ce:latest'   restart:   hostname: 'myhostname'   environment:     gitlab_omnibus_config: |       external_url = 'https://my.domain.com/git'       gitlab_rails['lfs_enabled'] = true       nginx['listen_port'] = 80       nginx['listen_https'] = false       nginx['proxy_set_headers'] = { 'x-forwarded-proto' => 'https', 'x-forwarded-ssl' => 'on' }       nginx['real_ip_trusted_addresses'] = [ 'proxy-ip', 'host-machine-ip' ]   ports:     - '80:80'   volumes:     - '/srv/gitlab/config:/etc/gitlab'     - '/srv/gitlab/logs:/var/log/gitlab'     - '/srv/gitlab/data:/var/opt/gitlab' 

i run apache proxy on seperate machine handles ssl lets encrypt. apache has been running long time , works fine every other application far. of them run in docker containers (owncloud, redmine, couchdb, website...).

<virtualhost *:443>         servername my-server-name          <ifmodule mod_headers.c>             header set strict-transport-security "max-age=15552000; includesubdomains"         </ifmodule>          documentroot /var/www/html         serveradmin info@my.domain.com          sslcertificatefile /etc/letsencrypt/live/my.domain.com/fullchain.pem         sslcertificatekeyfile /etc/letsencrypt/live/my.domain.com/privkey.pem         include /etc/letsencrypt/options-ssl-apache.conf         serveralias my.domain.com          proxypreservehost on         sslproxyengine on          requestheader set x-forwarded-protocol https         requestheader set x-forwarded-ssl on          proxypass /git http://gitlab-host-ip         proxypassreverse /git http://gitlab-host-ip          ########## +redirects other services same /git </virtualhost> 


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -