Bitnami Discourse and Wordpress standalone in Same AWS EC2 server

100 Views Asked by At

We are using Bitnami Discourse in AWS EC2 which is using default port 80. And the DNS is mapped to as domain eg: http:\\sample1.com which is working fine.

In the same AWS EC2 instance, we installed Wordpress standalone (without Bitnami) and it is using a different port (eg: 13702). And the DNS is mapped to the domain eg: http:\\sample2.com which is also working fine. But while calling URL http:\\sample2.com we are able to see the port number in the URL eg: http:\\sample2.com:13702

We need to mask the port number show in the URL http:\\sample2.com:13702 and it should remain http:\\sample2.com when URL http:\\sample2.com is called.

Note: We tried proxy pass and named virtual host option in Apache of Bitnami discourse and then in Apache of standalone Wordpress. But no luck to resolve it. Kindly provide solution for this issue.

1

There are 1 best solutions below

0
On

DNS mapping will work in server level. And by default app running in port 80 will be considered for direct access like http:\sample2.com. there are two ways to to access the wordpress app from http:\sample2.com

Method 1: Install some proxy server like nginx or haproxy and in that route the user to require application. But this will be little tricky and sometimes will lead to issues.

Method 2: In this method you can use Amazon ELB to route your url to the port where the app is running (in your case port: 13702). This will be a easiest one and more safer than first method. For elb configuration follow the below steps

Steps:

  1. Create a load balance in AWS ELB
  2. Point the load balancer to target 13702 of your instance.
  3. Attach the load balancer to the EC2 VM
  4. In route 53 instead of pointing to instance or ip point it to the ELB