Java 如何在 os x Mavericks 中将端口 80 转发到 8080
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19648751/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to forward port 80 to 8080 in os x mavericks
提问by user2930390
I installed Mac OS X Mavericks (10.9), and I'm using Jettyto publish a web app. I type
我安装了 Mac OS X Mavericks (10.9),我正在使用Jetty发布一个 Web 应用程序。我打字
sudo ipfw add 100 fwd 127.0.0.1,8080 tcp from any to any 80 in
(my hosts file has 127.0.0.1 abc.com
)
(我的主机文件有127.0.0.1 abc.com
)
but Safari can't connect to abc.com. It worked in OS X 10.8 though. Why?
但 Safari 无法连接到 abc.com。不过它在 OS X 10.8 中工作。为什么?
采纳答案by John
ipfw
has been deprecated since Mountain Lion but was not removed until Mavericks.
It's now using the ported pf
exclusively.
ipfw
自 Mountain Lion 以来已被弃用,但直到小牛队才被删除。它现在只使用移植的pf
。
I wrote a quick guideto configure and setup pf for port forwarding in Mavericks.
我写了一个快速指南来配置和设置 pf 以在 Mavericks 中进行端口转发。