Redirect to www from root domain
This commit is contained in:
parent
34495c80be
commit
91c65abb91
@ -3,6 +3,7 @@
|
|||||||
###############
|
###############
|
||||||
secret:
|
secret:
|
||||||
WORDPRESS_DB_PASSWORD: WPpa55w0rd!
|
WORDPRESS_DB_PASSWORD: WPpa55w0rd!
|
||||||
|
TRAEFIK_DREAMHOST_APIKEY: DHap1pa55w0rd!
|
||||||
|
|
||||||
##############
|
##############
|
||||||
### Docker ###
|
### Docker ###
|
||||||
@ -32,8 +33,9 @@ webserver:
|
|||||||
#TRAEFIK_WEB_ENABLED: true
|
#TRAEFIK_WEB_ENABLED: true
|
||||||
TRAEFIK_DEBUG: true
|
TRAEFIK_DEBUG: true
|
||||||
TRAEFIK_ACME_PROVIDER: dreamhost
|
TRAEFIK_ACME_PROVIDER: dreamhost
|
||||||
TRAEFIK_ACME_CASERVER: https://acme-v02.api.letsencrypt.org/directory
|
TRAEFIK_ACME_CASERVER: https://localhost/directory
|
||||||
TRAEFIK_ACME_EMAIL: frita@example.org
|
TRAEFIK_ACME_EMAIL: frita@example.org
|
||||||
|
TRAEFIK_DREAMHOST_APIKEY: "{{ secret.TRAEFIK_DREAMHOST_APIKEY }}"
|
||||||
|
|
||||||
#################
|
#################
|
||||||
### WordPress ###
|
### WordPress ###
|
||||||
|
@ -59,12 +59,16 @@ services:
|
|||||||
WORDPRESS_DB_USER: ${WORDPRESS_DB_USER:-wordpress}
|
WORDPRESS_DB_USER: ${WORDPRESS_DB_USER:-wordpress}
|
||||||
WORDPRESS_DB_PASSWORD: ${WORDPRESS_DB_PASSWORD}
|
WORDPRESS_DB_PASSWORD: ${WORDPRESS_DB_PASSWORD}
|
||||||
labels:
|
labels:
|
||||||
traefik.http.routers.wordpress.rule: Host(`${WORDPRESS_DOMAIN:-www.local.freeitathens.org}`)
|
traefik.http.routers.wordpress.rule: Host(`${WORDPRESS_DOMAIN:-www.local.freeitathens.org}`,`${TRAEFIK_ACME_DOMAIN_MAIN:-local.freeitathens.org}`)
|
||||||
traefik.http.routers.wordpress.entrypoints: websecure
|
traefik.http.routers.wordpress.entrypoints: websecure
|
||||||
|
traefik.http.routers.wordpress.middlewares: "wwwredirect"
|
||||||
traefik.http.routers.wordpress.tls: true
|
traefik.http.routers.wordpress.tls: true
|
||||||
traefik.http.routers.wordpress.tls.certresolver: letsencrypt
|
traefik.http.routers.wordpress.tls.certresolver: letsencrypt
|
||||||
traefik.http.routers.wordpress.tls.domains[0].main: ${TRAEFIK_ACME_DOMAIN_MAIN:-local.freeitathens.org}
|
traefik.http.routers.wordpress.tls.domains[0].main: ${TRAEFIK_ACME_DOMAIN_MAIN:-local.freeitathens.org}
|
||||||
traefik.http.routers.wordpress.tls.domains[0].sans: "${TRAEFIK_ACME_DOMAIN_SANS:-*.local.freeitathens.org}"
|
traefik.http.routers.wordpress.tls.domains[0].sans: "${TRAEFIK_ACME_DOMAIN_SANS:-*.local.freeitathens.org}"
|
||||||
|
traefik.http.middlewares.wwwredirect.redirectregex.regex: "^https://${TRAEFIK_ACME_DOMAIN_MAIN:-local.freeitathens.org}/(.*)"
|
||||||
|
traefik.http.middlewares.wwwredirect.redirectregex.replacement: "https://${WORDPRESS_DOMAIN:-www.local.freeitathens.org}/$${1}"
|
||||||
|
traefik.http.middlewares.wwwredirect.redirectregex.permanent: true
|
||||||
traefik.http.services.wordpress.loadbalancer.server.port: 80
|
traefik.http.services.wordpress.loadbalancer.server.port: 80
|
||||||
traefik.docker.network: traefik
|
traefik.docker.network: traefik
|
||||||
traefik.enable: ${WORDPRESS_WEB_ENABLED:-true}
|
traefik.enable: ${WORDPRESS_WEB_ENABLED:-true}
|
||||||
|
Loading…
Reference in New Issue
Block a user