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.
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: