2017-11-20 4 views
1

Dockerコンテナを使用してTraefikでサーバーを構成しようとしています。私はTraefikを設定して動作させ、ダッシュボードページを手に入れました。私は自分のGitLabサーバーを持っていたいと思っています。私はGitLabドッカーのイメージを引っ張り、ドッカーの作成ファイルを作成しました。Traefik httpsが完全に保護されていない

GitLabコンテナが起動するまでに時間がかかっても、動作するようです。私はTraefikダッシュボードからGitlabバックエンドを見ることができます。

問題はGitlabのアドレスに移動しようとすると、ブラウザ(FirefoxとChrome)が私のページが完全に安全でないことを伝えています。正確なエラーは次のとおりです。

Connection is not secure. Parts of this page are not secure (such as images) 

このエラーが発生する理由はわかりません。設定は基本的には基本的なものです。

ここに私のTraefik.tomlの設定です:

defaultEntryPoints = ["http", "https"] 

# Web section is for the dashboard interface 
[web] 
address = ":8080" 
    [web.auth.basic] 
    users = ["admin:$apr1$TF1rGQz9$OdtHJ15PT6LGWObE4tXuK0"] 

# entryPoints section configures the addresses that Traefik and the proxied containers can listen on 
[entryPoints] 
    [entryPoints.http] 
    address = ":80" 
    [entryPoints.http.redirect] 
     entryPoint = "https" 
    [entryPoints.https] 
    address = ":443" 
    [entryPoints.https.tls] 

# Acme section is for Let's Encrypt configuration 
[acme] 
email = "[email protected]" 
storage = "acme.json" 
entryPoint = "https" 
onHostRule = true 
onDemand = false 

[[acme.domains]] 
main = "domain.com" 

ここに私のドッキングウィンドウ-compose.yml

version: '3.3' 

networks: 
    proxy: 
    external: true 
    internal: 
    external: false 

services: 
    gitlab: 
    image: gitlab/gitlab-ce 
    container_name: gitlab 
    labels: 
     - traefik.backend=gitlab 
     - traefik.frontend.rule=Host:git.domain.com 
     - traefik.docker.network=proxy 
     - traefik.port=80 
    networks: 
     - internal 
     - proxy 

ここTraefikコンテナのための私のドッキングウィンドウの実行コマンドのだ:あなたのよう

docker run -d \ 
    -v /var/run/docker.sock:/var/run/docker.sock \ 
    -v $PWD/traefik.toml:/traefik.toml \ 
    -v $PWD/acme.json:/acme.json \ 
    -e TZ="Europe/Paris" \ 
    -p 80:80 \ 
    -p 443:443 \ 
    -l traefik.frontend.rule=Host:monitor.domain.com \ 
    -l traefik.port=8080 \ 
    --network proxy \ 
    --name traefik \ 
    traefik:1.3.6-alpine --docker --logLevel=DEBUG 

それは非常に基本的な設定であることがわかりますが、なぜ完全に安全なGitLabページを手に入れることができないのですか? acme.jsonファイルでは、メインドメイン「domain.com」とサブドメイン「git.domain.com」が表示されます。だからそれは安全でなければならない。

私には何が欠けていますか? :/

+0

スタックオーバーフローは、プログラミングおよび開発の質問のサイトです。この質問は話題にならないようです。ヘルプセンターの[ここではどのようなトピックについて質問できますか](https://stackoverflow.com/help/on-topic)を参照してください。恐らく、[Server Fault](https://serverfault.com)は、Traefik設定の問題を尋ねるのに適しています。 – Matt

答えて

2

GitLabページが安全でない理由をついに見つけました。これは、GitLabが安全でないパスのアバタープロフィール画像を「htttp:// picture_address」として使用するためです。

同じ問題を抱える人を助けることができる場合:

+0

そのイメージが同じドメインにある場合は、とにかくhttpsに再ルーティングする必要があります。私はdrupalサイトでも起こっていることに気づいた。 – three

関連する問題