Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想通过浏览器中的mylocal:2700访问我的本地 Web 服务器mylocal:80。怎么能不费吹灰之力就实现呢?问题是我正在使用外部应用程序 api,并且该应用程序需要mylocal:2700作为其来源。我们在几台机器上工作,其中一台机器的本地服务器是mylocal:2700。我不能改变那个。所以我正在改变所有其他机器。我们正在使用 apache 和 ubuntu。
iptables -t nat -A PREROUTING -p tcp --dport 27000 -j REDIRECT --to-port 80