V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  PMinV2  ›  全部回复第 2 页 / 共 2 页
回复总数  36
1  2  
2022-08-08 09:23:05 +08:00
回复了 x9sec 创建的主题 IPv6 家里移动 IPv6,单位只有 IPv4,怎么访问家里的地址呢?
现在是 2022 年了,这个问题有新方案了么?
2018-02-01 11:29:29 +08:00
回复了 PMinV2 创建的主题 程序员 Nginx + supervisord 怎么配置可以实现公网域名访问
@defunct9 大佬要是能给我指点迷津就更好了。作为一个 PM 能到部署阶段已经不易了
2018-02-01 11:21:48 +08:00
回复了 PMinV2 创建的主题 程序员 Nginx + supervisord 怎么配置可以实现公网域名访问
@gqkkk 是防火墙的问题,已经解决了
2018-02-01 11:21:21 +08:00
回复了 PMinV2 创建的主题 程序员 Nginx + supervisord 怎么配置可以实现公网域名访问
更正一下:0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:9001
2018-02-01 11:17:56 +08:00
回复了 PMinV2 创建的主题 程序员 Nginx + supervisord 怎么配置可以实现公网域名访问
@seancheung 我重新考虑了防火墙
2018-02-01 11:16:48 +08:00
回复了 PMinV2 创建的主题 程序员 Nginx + supervisord 怎么配置可以实现公网域名访问
问题得到了解决,感谢各位的鼎力相助。

原因如下:我的 Nginx 和 supervisord 都没问题了,但是我的端口以为没问题但是其实存在问题
fuck,阿里云安全组,禁止了我的端口。
我一开始使用了下面两条命令开通了防火墙访问权限

iptables -A INPUT -p tcp --dport 9001 -j ACCEPT
iptables -A OUTPUT -p tcp --sport 9001 -j ACCEPT
iptables -L -n
#看到下面这个就以为 OK 了
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:9001

但是经过仔细排查问题重新使用下面这个命令解决了问题
iptables -I INPUT 4 -p tcp -m state --state NEW -m tcp --dport 9001 -j ACCEPT
service iptables save
iptables -nvL
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:9001
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:9889
虽然作为一个产品并不能看懂这两条有啥区别,我是从 iptables -h 文档中查到的命令进行尝试的,有大佬解释一下吗?

运行良好的 supervisord Web 服务
running
pid 9706, uptime 0:26:03 wechatspider_processor Restart Stop Clear Log Tail -f
running
pid 15689, uptime 0:00:01 wechatspider_redis Restart Stop Clear Log Tail -f
running
pid 9707, uptime 0:26:03 wechatspider_scheduler Restart Stop Clear Log Tail -f
2018-02-01 10:27:34 +08:00
回复了 PMinV2 创建的主题 程序员 Nginx + supervisord 怎么配置可以实现公网域名访问
更新配置
[inet_http_server]
port=127.0.0.1:9001

server {
listen 9001;

server_name mydomain . com;

location / {
proxy_pass http:// 127.0.0.1:9001;
proxy_buffering off;
}
}
2018-02-01 10:25:13 +08:00
回复了 PMinV2 创建的主题 程序员 Nginx + supervisord 怎么配置可以实现公网域名访问
@yxwzaxns 日志没有关于这个请求的。
2018-02-01 10:24:49 +08:00
回复了 PMinV2 创建的主题 程序员 Nginx + supervisord 怎么配置可以实现公网域名访问
@msg7086 已经按你说的修复了,但是还是没能成功访问
2018-02-01 10:00:58 +08:00
回复了 PMinV2 创建的主题 程序员 Nginx + supervisord 怎么配置可以实现公网域名访问
@yxwzaxns 修改之后显示:
无法访问此网站 拒绝了我们的连接请求。

Header 中的返回就一条提示:Referrer Policy:no-referrer-when-downgrade
2018-02-01 09:56:03 +08:00
回复了 PMinV2 创建的主题 程序员 Nginx + supervisord 怎么配置可以实现公网域名访问
@pepesii 对的
2018-02-01 09:40:25 +08:00
回复了 PMinV2 创建的主题 程序员 Nginx + supervisord 怎么配置可以实现公网域名访问
2018-02-01 09:40:05 +08:00
回复了 PMinV2 创建的主题 程序员 Nginx + supervisord 怎么配置可以实现公网域名访问
@defunct9 大佬要这么猛嘛
1  2  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   833 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 27ms · UTC 19:37 · PVG 03:37 · LAX 12:37 · JFK 15:37
Developed with CodeLauncher
♥ Do have faith in what you're doing.