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

issue: traefik proxy >> docker-compose.yml >> 403 Forbidden nginx/1.12.0 #17

Open
jujes opened this issue Jun 11, 2017 · 3 comments
Open

Comments

@jujes
Copy link

jujes commented Jun 11, 2017

issue: 403 Forbidden nginx/1.12.0
Failed to load resource: the server responded with a status of 403 (Forbidden)

Hi, someone know how deploy this docker hugo version using traefik as proxy?
here my file:

docker-compose.yml

version: '2'

services:
  hugo:
    image: jojomi/hugo:latest
    volumes:
      - ./src:/src/
      - ./output:/output/
    labels:
      - "traefik.enable=false"
    command: hugo server --bind 0.0.0.0
    environment:
      - HUGO_BASEURL=mydomain.com
    restart: always
    networks:
      - back

  web:
    image: jojomi/nginx-static
    volumes:
      - ./output:/var/www
    environment:
      - VIRTUAL_HOST=mydomain.com
    labels:
      - "traefik.enable=true"
      - "traefik.backend=mydomain.com"
      - "traefik.frontend.rule=Host:mydomain.com, www.mydomain.com"
      - "traefik.docker.network=docker_webgateway"
      - "traefik.port=80"
    restart: always
    networks:
      - docker_webgateway
      - back
    links:
      - hugo

networks:
  docker_webgateway:
    external:
      name: docker_webgateway
  back:
    driver: bridge

thanks in advance

@jujes jujes changed the title traefik proxy >> docker-compose.yml issue: traefik proxy >> docker-compose.yml >> 403 Forbidden nginx/1.12.0 Jun 11, 2017
@thepenguinthatwants
Copy link

Damn I was also wondering about this thing.

@mgnisia
Copy link

mgnisia commented Sep 3, 2019

Hi @jujes and @thepenguinthatwants i was able to fix this problem. One important modification was the volumes definition of the nginx. I changed it to /usr/share/nginx/html:ro. You find a link to the docker compose here https://github.com/mgnisia/boilerplate-hugo-traefik/blob/master/docker-compose.yml

@thepenguinthatwants
Copy link

Hi @jujes and @thepenguinthatwants i was able to fix this problem. One important modification was the volumes definition of the nginx. I changed it to /usr/share/nginx/html:ro. You find a link to the docker compose here https://github.com/mgnisia/boilerplate-hugo-traefik/blob/master/docker-compose.yml

I just saw ur reddit post yesterday.

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