Alternative http port?

主宰稳场 提交于 2019-12-11 15:37:38

问题


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.


回答1:


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.




回答2:


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




回答3:


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




回答4:


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++.



来源:https://stackoverflow.com/questions/2352220/alternative-http-port

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!