将节点js app映射为Apache中的目录

时间:2014-03-11 09:42:29

标签: javascript node.js apache

我想将节点应用作为我的域的路径提供服务,如下所示:http://example.com/foo实际上将为在端口8080上运行的节点应用提供服务。

我研究过ProxyPass和ProxyPassReverse:

ProxyPass /foo http://localhost:8080
ProxypassReverse /foo http://localhost:8080

这将为节点应用程序的index.html提供服务,但我在控制台中收到有关所有资产的错误:

Failed to load resource: the server responded with a status of 404 (Resource not found) http://example.com/styles/4742a4e8.main.css

我认为ProxyPassReverse指令会解决这个问题,但显然不是。我对非常有关apache的知识。关于如何解决这个问题的任何好主意?

免责声明:是的,我在SO上查看了很多关于apache问题的nodejs,但没有一个解决在url中使用子目录的问题

0 个答案:

没有答案