小编use*_*271的帖子

Cloudflare +反向代理 - 错误1000

因为SEO我设置了一个工作正常的反向代理:

设置如下:

1) http://www.example.com(node.js托管在heroku)

2) http://blog.example.com(在godaddy托管的wordpress)

3)访问http://www.example.com/blog的访问者从http://blog.example.com获取内容.

这工作正常,1)我也有代理使用流行的nodejitsu htt-proxy和httpProxyRules模块:

// Set up proxy rules instance 
var proxyRules = new httpProxyRules({
    rules: {
      '.*/blog': 'https://blog.example.com', // Rule (1) 
    },
    default: 'https://www.example.com' // default target 
});

// Create reverse proxy instance 
var proxy = httpProxy.createProxy();

// Create http server that leverages reverse proxy instance 
// and proxy rules to proxy requests to different targets 
http.createServer(function(req, res) {
    // a match method is exposed on the …
Run Code Online (Sandbox Code Playgroud)

wordpress reverse-proxy node.js cloudflare

2
推荐指数
1
解决办法
1543
查看次数

标签 统计

cloudflare ×1

node.js ×1

reverse-proxy ×1

wordpress ×1