网站重定向网址不正确

时间:2018-01-19 20:24:25

标签: wordpress reverse-proxy docker-swarm traefik

我试图在以下地址的群中部署wordpress:

http://apps.exemplo.com/ti/bc

当您访问http://apps.example.com/ti/bc时,wordpress会重定向到 http://apps.example.com/wp-admin/install.php省略" ti / bc"。 是否可以仅通过使用traefik来更正此行为,而无需更改wordpress图像中的代码?

看看我的筹码:

version: '3.1'

services:

  wordpress:
    image: wordpress
    restart: always    
    networks:
     - default
     - proxy-apps    
    environment:
      WORDPRESS_DB_PASSWORD: root
      WORDPRESS_DB_HOST: lpddb:3333
      WORDPRESS_DB_USER: root
    deploy:
      labels:
       - "traefik.port=80"
       - "traefik.docker.network=proxy-apps"
       - "traefik.frontend.rule=PathPrefixStrip:/ti/bc"
       - "traefik.backend=wordpress"       
    volumes:
      - base-conhecimento:/var/www/html

networks:
  proxy-apps:
    external: true

volumes:
  base-conhecimento:
    driver: local

0 个答案:

没有答案