2017-06-29 26 views
0

有沒有可能有域/路徑重定向到沒有路徑的內部服務器?即hxxp://example.com/test重定向到內部服務器192.168.1.1:8888Can Traefik將example.com/test重定向到192.168.1.1:8888而沒有路徑?

我有我的traefik和使用supdomains運行,但只要我嘗試使用路徑遇到問題。我試過pathprefixstrip無濟於事。

這是運行在我的qnap服務器上的docker中。

[frontends.test1] 
    backend = "test1" 
    entrypoints = ["https"] 
     [frontends.tes1t.routes.test1] 
     rule = "Host:example.com;PathPrefixStrip /test" 

[backends.test1] 
      [backends.test1.servers.test1] 
      url = "hxxps://192.168.1.1:8888" 

回答

3

使用PathPrefixStrip:/test代替PathPrefixStrip /test(你使用Host:example.com,而不是Host example.com同樣的想法嘗試。

相關問題