我想在vue docker容器的8080端口上重定向http和https请求。
为此,我尝试使用Traefik,但我不太清楚。
这是我实际的traefik.toml和docker-compose.yml文件:
traefik.toml:
<nav class="nav navbar-expand-sm navbar-dark justify-content-between justify-content-sm-start">
<a class="navbar-brand" href="" id="homeOverride"> <span class="overrideFonts"> Home </span> </a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse flex-grow-0 flex-sm-grow-1" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href=""> <span class="overrideFonts"> Projects </span> </a>
</li>
<li class="nav-item">
<a class="nav-link" href=""> <span class="overrideFonts"> Contact </span> </a>
</li>
</ul>
</div>
</nav>
docker-compose.yml:
defaultEntryPoints = ["http", "https"]
[web]
address = ":7777"
[web.auth.basic]
users = ["admin:$apr1$Qai983Ya$XNOr.GZjn3Uggtu3iHqbY/"]
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[acme]
email = "mail@domain.com"
storage = "acme.json"
entryPoint = "https"
onHostRule = true
onDemand = true
我要做什么是什么问题?我在http和https请求中收到404错误。