Quantcast
Channel: Active questions tagged amazon-ec2 - Stack Overflow
Viewing all articles
Browse latest Browse all 29537

How to redirect IP or AWS default hostname based traffic to public DNS?

$
0
0

I have one agular app deployed on AWS instance under apache root directory (var/www/html). The app is currently accessed by https://IP, http://IP , https://ec2-.., and http://ec2-...

Recently we purchased one domain for our app like, abc.domain.com, Now app is accessible through newly configured domain, but along with that app is still accessible with above URLS also.

We wanted to redirect all the URL if it is typed with IP or ec2-* to the newly created domain automatically.

Eg - https://IP --> https://abc.domain.com, http://IP --> https://abc.domain.com, http://ec2-1.2.3.-4 --> https://abc.domain.com.

(ec2-..* is default hostname when you create VM instance in AWS with public IP use).

How to achieve this in apache server level.

Note - I am able to redirect http://IP -->https://abc.domain.com


Viewing all articles
Browse latest Browse all 29537

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>