【发布时间】:2015-05-09 17:04:57
【问题描述】:
我有一个blog here。
这就是我所做的:
var httpProxy = require('http-proxy');
var apiProxy = httpProxy.createProxyServer();
app.get("/blog/", function(req, res){
apiProxy.web(req, res, { target: 'http://69.195.124.88/~crowdfoo/blogbeaconboss/:80' });
});
但它说:
404:找不到文件
当我打开时: http://www.example.com/blog/ 用于生产或http://localnode.com:3000/blog/ 在本地节点为 localhost 的本地机器上
不胜感激, 谢谢!
【问题讨论】:
-
只是为了确定,您是否将 www.example.com 指向 localhost,这就是您使用 www.example.com 的原因吗?
-
@JosefEngelfrost,更新了问题以澄清这一点。
标签: node.js wordpress http-proxy node-http-proxy