2017-11-20 1 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) 

이 오류가 발생하는 이유를 알 수 없으므로 구성이 기본적입니다.

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 

당신과 같이

여기
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 용기 내 고정 표시기 실행 명령입니다입니다 :

여기 내 Traefik.toml의 설정입니다 그것은 매우 기본적인 구성으로 볼 수 있습니다. 왜 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

관련 문제