提前谢谢你的帮助,
我想通过httpd(redhat)在一个有很多虚拟主机的服务器上启动nodejs应用程序,所以我转到了位于/etc/httpd/conf/httpd.conf的httpd conf文件,并在文件末尾添加了以下配置:
<VirtualHost *:80>
ServerName subdomain.example.com
ProxyPreserveHost on
ProxyPass / http://localhost:8080/
</VirtualHost>
我的nodejs应用程序在localhost:8080上运行,但是当我转到subdomain.example.com时,我得到的只是一个服务器未找到错误。在httpd配置文件中尝试了很多组合,但都没有成功。每次通过运行
service httpd restart
最佳答案
这只是一个dns传播问题。通过在dns条目中添加a记录进行修复。
关于node.js - 在httpd子域上运行NodeJS应用,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/40330656/