替代 http 端口?

发布于 2024-08-23 10:04:53 字数 265 浏览 3 评论 0原文

我想用 C++ 编写一个浏览器聊天并编写一个自己的服务器,因为您无法使用 php 和其他语言在不同实例(聊天用户)之间发送文本。 我的 apache 使用端口 80 运行,这就是为什么我无法在端口 80 上运行“聊天 http 服务器”。如果某个浏览器不使用端口 80,某些浏览器会阻止与 http 站点的连接。 有人知道,我应该为这个小型服务器使用哪个端口以获得最佳浏览器兼容性?也许8080?我也可以购买不同的 IP 以在 :80 下运行它,但我的主机想要每月 5 欧元购买新 IP...

谢谢。

I want to write a browser-chat and write an own server in c++, because you can not send text between the different instances (chat user) in php and other languages.
I have apache running with port 80 and that's why I cant run the "chat http server" on port 80. Some browsers block connection to a http site if it does not use port 80.
Does someone knows, what port I should use for this small server for best browser compatibility? Maybe 8080? I could also buy a different IP to run it under :80, but my host wants 5€ per month for a new ip...

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

五里雾 2024-08-30 10:04:53

您可以使用 mod_proxy(或 mod_proxy_balancer)将 Apache 站点的某个分支上的请求转发到在其他端口上侦听 localhost 的其他 Web 服务器。

You can use mod_proxy (or mod_proxy_balancer) to forward requests on some branch of your Apache site to the other web server that listens to localhost on some other port.

猛虎独行 2024-08-30 10:04:53

使用主机名对应用程序进行分区 - 即 www.foo.bar:80chat.foo.bar:80

Use hostname to partition your application --i.e., www.foo.bar:80 and chat.foo.bar:80 ?

可遇━不可求 2024-08-30 10:04:53

除了端口 80 之外,端口 443(通常是 https)最常被允许通过各种防火墙进行出站连接。

Besides port 80, port 443 (normally https) is most common to be allowed for outbound connections through various firewalls.

青瓷清茶倾城歌 2024-08-30 10:04:53

您可以在 Apache mod_chat 或其他东西中编写您的站点。通过这种方式,您可以将所有基本的 HTTP 内容保存到 Apache,并可以利用 C++ 的全部功能专注于您的应用程序。

You could write your site in a Apache mod_chat or something. This way you keep all the basic HTTP stuff to Apache and can concentrate on your application will the full power of C++.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文