[英]accessing my container via my ip:host not working anymore
I use docker/docker-compose and nginx on my own server.我在自己的服务器上使用 docker/docker-compose 和 nginx。 I was able to access to my container via external port like
my_adress:8080
then i made a redirect via nginx我能够通过像
my_adress:8080
这样的外部端口访问我的容器,然后我通过 nginx 进行了重定向
{
listen 80
servername my_adress.8080
return 301 https://my_adress.8080
}
and then i removed the nginx conf.然后我删除了 nginx conf。 I restarted nginx services but now i can't access to
http://my_adress:8080
anymore there is an automatic redirect 301 to https://my_adress
without port 8080我重新启动了 nginx 服务,但现在我无法访问
http://my_adress:8080
有一个自动重定向301到https://my_adress
没有端口 8080
I search online how to remove nginx cache or something similar by didn't find it i searched in https://serverfault.com/questions/825331/nginx-still-redirects-even-though-i-removed-the-rule-from-the-conf but diden't find solution我在网上搜索如何删除 nginx 缓存或类似的东西没有找到我在https://serverfault.com/questions/825331/nginx-still-redirects-even-though-i-removed-the-rule- from-the-conf但没有找到解决方案
when i do service docker status
i get in CGroup: /system.slice/docker.service当我执行
service docker status
docker service docker status
我进入了CGroup:/system.slice/docker.service
/usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 8080 -container-ip 172.19.0.3 -container-port 80
Any ideas why i doesn't work anymore?任何想法为什么我不再工作?
I found where the problem was.我找到了问题所在。
I was using the image https://hub.docker.com/r/onlyoffice/documentserver and i set up the https config我正在使用图像https://hub.docker.com/r/onlyoffice/documentserver并设置了 https 配置
see "Running ONLYOFFICE Docs using HTTPS" in this page : https://helpcenter.onlyoffice.com/installation/docs-community-install-docker.aspx请参阅此页面中的“使用 HTTPS 运行 ONLYOFFICE 文档”: https ://helpcenter.onlyoffice.com/installation/docs-community-install-docker.aspx
And on this image they were an automatic proxy to redirect https to https, so i was not linked to the nginx conf on my server it was only inside the docker-proxy在此图像上,它们是将 https 重定向到 https 的自动代理,因此我没有链接到服务器上的 nginx conf,它仅在 docker-proxy 内部
So the 2 solutions that i found:所以我发现的2个解决方案:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.