configs of treafik and the infos of the routers etc. are given in
and
the expert from my app.yml for discourse based on Discourse with Traefik 2.0 - installation - Discourse Meta
app.yml
templates:
- "templates/postgres.template.yml"
- "templates/redis.template.yml"
- "templates/web.template.yml"
- "templates/web.ratelimited.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
- "templates/web.ssl.template.yml"
- "templates/web.letsencrypt.ssl.template.yml"
## which TCP/IP ports should this container expose?
## If you want Discourse to share a port with another webserver like Apache or nginx,
## see https://meta.discourse.org/t/17247 for details
expose:
# - "80:80" # http
# - "443:443" # https
# - "80" # http
# - "443" # https
labels:
app_name: discourse
traefik.enable: true
traefik.docker.network: bridge_proxy_traefikv2
traefik.http.services.discourse.loadbalancer.server.port: 80
#traefik.http.services.discourse.loadbalancer.server.port: 443
traefik.http.routers.discourse.rule: Host(`forum.fairbnb.community`)
#traefik.http.routers.discourse.entrypoints: websecure
traefik.http.routers.discourse.entrypoints: web
traefik.http.routers.discourse.tls: true
traefik.http.routers.discourse.tls.certresolver: tlsChallenge_letsencrypt
docker_args:
- "--network=bridge_proxy_traefikv2"
params:
db_default_text_search_config: "pg_catalog.english"
## Set db_shared_buffers to a max of 25% of the total memory.
## will be set automatically by bootstrap based on detected RAM, or you can override
db_shared_buffers: "128MB"
## can improve sorting performance, but adds memory usage per-connection
#db_work_mem: "40MB"
## Which Git revision should this container use? (default: tests-passed)
#version: tests-passed
env:
LANG: en_US.UTF-8
# DISCOURSE_DEFAULT_LOCALE: en
## How many concurrent web requests are supported? Depends on memory and CPU cores.
## will be set automatically by bootstrap based on detected CPUs, or you can override
UNICORN_WORKERS: 2
## TODO: The domain name this Discourse instance will respond to
## Required. Discourse will not work with a bare IP number.
DISCOURSE_HOSTNAME: forum.fairbnb.community
## Uncomment if you want the container to be started with the same
## hostname (-h option) as specified above (default "$hostname-$config")
#DOCKER_USE_HOSTNAME: true
.
with that config, I get 404 although service is indicated as ok
the logs are in
whoami.fairbnb.community:
185.46.214.116 - - [03/Jan/2020:20:36:19 +0000] "GET / HTTP/1.1" 200 740 "-" "-" 6 "whoami_sub@docker" "http://172.20.0.2:80" 40ms
forum.fairbnb.community
185.46.214.116 - - [03/Jan/2020:20:38:01 +0000] "GET / HTTP/1.1" - - "-" "-" 7 - - 0ms
185.46.214.116 - - [03/Jan/2020:20:38:03 +0000] "GET /service-worker-29f380effd40cdaa98cfa88ea74b0c66ba6ca6c901f666253c7592d49fa5e7d4.js HTTP/1.1" - - "-" "-" 8 - - 0ms
185.46.214.116 - - [03/Jan/2020:20:39:02 +0000] "GET /service-worker-29f380effd40cdaa98cfa88ea74b0c66ba6ca6c901f666253c7592d49fa5e7d4.js HTTP/1.1" - - "-" "-" 9 - - 0ms
traefik.fairbnb.community
185.46.214.116 - - [03/Jan/2020:20:39:44 +0000] "GET /dashboard/dashboard/dashboard/dashboard/dashboard/dashboard/dashboard/dashboard/dashboard/dashboard/dashboard/dashboard/dashboard/dashboard/dashboard/dashboard/dashboard/dashboard/dashboard/ HTTP/1.1" 404 19 "-" "-" 10 "traefik_dashboard@docker" - 1ms
89.248.167.131 - - [03/Jan/2020:21:09:40 +0000] "GET / HTTP/1.1" 301 17 "-" "-" 11 "dashboard@internal" - 7ms
HOW CAN I DEBUG 404?
curl isn't helping:
root@Ubuntu18:/opt/01_SysAdminScripts# curl -v -H Host:forum.fairbnb.community http://127.0.0.1
* Rebuilt URL to: http://127.0.0.1/
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 80 (#0)
> GET / HTTP/1.1
> Host:forum.fairbnb.community
> User-Agent: curl/7.58.0
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Content-Type: text/plain; charset=utf-8
< X-Content-Type-Options: nosniff
< Date: Fri, 03 Jan 2020 21:57:53 GMT
< Content-Length: 19
<
404 page not found
* Connection #0 to host 127.0.0.1 left intact