[英]Can I make Apache serve my Node.js server on a subdomain?
目前,Apachi 在xxx.xx.xx.xx:80
上为我的前端项目提供服务,我的域名指向它。 所以当我 go 到www.domainname.com时,我的前端项目得到了服务。
我还有一个在xxx.xx.xx.xx:3000
上运行的 Node.js 项目。 I'm curious if it is possible to make Apache serve the project, that is served on xxx.xx.xx.xx:3000
by Node.js, on www.api.domainname.com
. 有点像某种代理。
您可以创建一个虚拟主机,其 ServerName 是您想要使用的域(不是 IP 地址)和 ServerAlias 任何其他您想要配置和提供相同内容的域。 您可以在此处阅读有关如何配置虚拟主机的更多信息: https://httpd.apache.org/docs/2.4/vhosts/examples.ZFC35FDC70D5FC69D269883A822C7A53
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.