[英]Mod_proxy , apache and node.js in one url
So i got a node.js api server and a apache webserver both on the same server. 所以我在同一台服务器上都有一个node.js api服务器和一个apache网络服务器。 The problem is the node.js server has to be connected like this (111.111.11:3000) that would be the ip of the server itself and the port of the node attached to it, while the apache server is on the domain itself (mydomain.com).
问题是node.js服务器必须像这样(111.111.11:3000)连接,这将是服务器本身的ip和连接到它的节点的端口,而apache服务器在域本身( mydomain.com)。
Now my question is what does mod_proxy actually do? 现在我的问题是mod_proxy实际做什么? Does it allow me to acess my node routings by just using the apache domain.
它是否允许我仅使用apache域访问节点路由。
For example is i would be needing to acess the routing /api/getbla i would be typing this in the search bar 111.111.11:3000/api/getbla. 例如,如果我需要访问路由/ api / getbla,我将在搜索栏中输入以下内容:111.111.11:3000 / api / getbla。
Will mod_proxy allow me to do it like this instead mydomain.ocm/api/getbla? mod_proxy可以让我这样做吗,而不是mydomain.ocm / api / getbla?
Sorry! 抱歉! I tried myself and it did work.
我尝试了一下,它确实起作用了。 The reversed proxy allowed my node server to act like its a part of apache.
反向代理使我的节点服务器可以像apache一样工作。 Example i could acess the api by just typing the domain name.
例如,我可以通过仅输入域名来访问api。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.