title: Using different ports of same ip in aws and creating subdomain for them as to connect them with google oauth2
body: <p>I'm trying to find a solution for my below explained scenario i.e.</p>
  <p>I created an aws ec2 instance for the running my MERN app, but I want to run both front-end and back-end with same ip i.e. on same ec2 instance, so to do that I create security group with different <strong>ports</strong> and my app started working<a href="https://i.stack.imgur.com/ejavb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ejavb.png" alt="ports description" /></a></p>
  <p>but I started facing a issue with creating a subdomain for those <strong>ip+port</strong> e.g. xx.xxx.xx.xxx:3000 for running backend as shown below, the dns setting says I cannot create a subdomain with <strong>ip+port</strong> I can create it with <strong>ip only</strong> (that I have create for my front-end and it's running)</p>
  <p><a href="https://i.stack.imgur.com/9k6rh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9k6rh.png" alt="godaddy dns image" /></a>
  I wanted to create a subdomain for my back-end as to give it the access for google oauth2, because if I use the <strong>ip+port</strong> e.g. 0.0.0.0:3000, to be given access in google console it doesn't allow to do that as shown below</p>
  <p><a href="https://i.stack.imgur.com/ZzYIZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZzYIZ.png" alt="google console" /></a></p>
  <p>I searched so many article and blogs for the solution but didn't find anything helpful related to the topic, but I got some mentions of htaccess configurations with which I can host multiple website using same ip, I don't know about it even I'm very new to the server setup doing it first time by myself, need some guidance or solution to this, if anyone can provide me any solution or reference to any solution, it will be very helpful for me, thanks in advance</p>