简体   繁体   English

无法使用 docker 中的 nginx 反向代理从外部访问

[英]can't access from outside with nginx reverse proxy in docker

i know there are lots of similar questions about but no one help me.我知道有很多类似的问题,但没有人帮助我。 I have a linux server running nginx reverse proxy in docker, a duckdns domain created,opened my router port 80 and 443. I can't access from outside with my domain name or public ip, it seems like my router refuses external request.我有一个 linux 服务器在 docker 中运行 nginx 反向代理,创建了一个 duckdns 域,打开了我的路由器端口 80 和 443。我无法使用我的域名或公共 ip 从外部访问,看来我的路由器拒绝外部请求。 I tried with lots of configuration, follow lots of guides on web... I get crazy to solve this problem.我尝试了很多配置,遵循 web 上的很多指南......我疯狂地解决这个问题。 I think problem is before nginx, so i not post my nginx conf.我认为问题出在 nginx 之前,所以我没有发布我的 nginx conf。 If can help, I will post it.如果可以帮助,我会发布它。 Hope someone can help me.希望可以有人帮帮我。 Thank you so much太感谢了

There are several things that could be causing the issue with your router refusing external requests.有几种情况可能导致您的路由器拒绝外部请求的问题。 Here are a few things to check:以下是一些需要检查的事项:

Make sure that your router's firewall is configured to allow incoming connections on ports 80 and 443. Some routers have a built-in firewall that needs to be configured to allow traffic through specific ports.确保路由器的防火墙配置为允许端口 80 和 443 上的传入连接。某些路由器具有内置防火墙,需要配置为允许流量通过特定端口。

Confirm that your router is properly forwarding incoming requests to the correct IP address and port on your.network.确认您的路由器正确地将传入请求转发到您的网络上正确的 IP 地址和端口。 This is typically done through a feature called port forwarding.这通常是通过称为端口转发的功能来完成的。

Check your router's security settings to ensure that it is not blocking incoming requests based on the source IP address or domain name.检查路由器的安全设置,确保它不会阻止基于源 IP 地址或域名的传入请求。 Some routers have the option to block incoming requests from specific IP addresses or domain names.一些路由器可以选择阻止来自特定 IP 地址或域名的传入请求。

Confirm that your Linux server is properly configured to handle incoming requests.确认您的 Linux 服务器已正确配置以处理传入请求。 This includes checking that your Nginx reverse proxy is running and properly configured to forward requests to the correct IP address and port.这包括检查您的 Nginx 反向代理是否正在运行并正确配置以将请求转发到正确的 IP 地址和端口。

Verify that your DNS is pointing to the right IP address, you can use online tools like https://www.whatsmydns.net/ to check this.验证您的 DNS 是否指向正确的 IP 地址,您可以使用https://www.whatsmydns.net/等在线工具进行检查。

Check if your router have any VPN or proxy service enabled, which could be affecting the incoming request.检查您的路由器是否启用了任何 VPN 或代理服务,这可能会影响传入请求。

Check if your ISP is blocking incoming connection to your public IP address.检查您的 ISP 是否阻止传入连接到您的公共 IP 地址。

It's also possible that there might be a problem with your router's firmware or hardware, in that case, you may need to contact the manufacturer for further assistance.也有可能您的路由器固件或硬件存在问题,在这种情况下,您可能需要联系制造商以获得进一步帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM