Serve non-subdomain routes

社会主义新天地 提交于 2019-12-06 08:07:34

You could put nginx upstream of both of them and use it as a reverse proxy to both of them matching the URL that is being targeted.

A sample nginx config might look something like this:

server {

  server_name example.com;

  location / {
    proxy_pass http://10.0.0.5;
  }

  location /blog/ {
    proxy_pass  http://10.0.0.6;
  }

}

Where 10.0.0.5 is your IIS server running your ASP application and 10.0.0.6 is whatever box is running your Wordpress server.

Alternatively you might want to take a look at Amazon's API Gateway service which allows you to direct traffic to your chosen end points which could be your application inside AWS, a server somewhere outside of AWS, a Lambda function or pretty much anything that "talks" HTTP.

CloudFlare isn't a "load-balancing tool" it's a CDN built on nginx and a DNS service. I'm not aware of any load-balancing feature that CloudFlare provides. You could probably setup a page rule in CloudFlare to accomplish what you want. The problem there is going to be the requirement that you use CloudFlare as your DNS server, which may not be ideal for you.

You could do what ydaetskcoR suggests and put your own nginx server in front of both web servers. That would be my recommendation.

Route53 is a DNS system, and only deals with domain names. It will not help you solve this situation.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!