Application and WordPress blog in same Url with different subdirectory. Amazon Route

I have an application on heroku. I also have a Cname on Amazon Route 53 that allows access to my application. Something like example.com gives me access to my Heroku application.

I have created an ubuntu instance on Amazon EC2 and I have installed wordpress here because I need a blog associated to my application. Then I have a public dns like ec2dnsblog.com.

Read More

I like to access my application using example.com and access my blog using example.com/blog (when someone puts this url in I want it to access ec2dnsblog.com). Someone have an idea about how to do this?

Related posts

2 comments

  1. You can solve that by creating two CloudFront Distributions:
    The first pointing at the root (/) of your site
    The second for the blog with a custom ‘origin path’ in the definition of ‘/blog’

    Each of them would use the same ‘Origin Domain Name’, but redirect to different locations from there.

    And by the way: CloudFront also helps offload some of the traffic to your EC2 instance, making it faster and usually cheaper to serve up your content.

  2. I have solved it. The way we decided tu use is install a new instance for EC2 and we have installed there Ngnix. Then Ngnix let to us when we go to / it shows the Heroku applicatin and when yo put /blog it shows the wordpress EC2 instance.

Comments are closed.