Aditya Pratap
Aditya Pratap

Reputation: 33

access tomcat deployed application (aws) by domain name (www.mydomain.com)

I am new to aws hosting, please help me out in pointing the domain name to tomcat hosted application. During configuration following steps are taken-

1- I have created ec2 ubuntu instance. Configured with java, tomcat. Deployed my war files on tomcat. I am able to access the application successfully. Using http://ec2-xx-xx-xxx-xx.us-west-2.compute.amazonaws.com:8080/login.jspx url.

2- A domain name(www.mydomain.com) registered at godaddy.

3- Created hostedzone (console.aws.amazon.com/route53) and set the nameservers to my godaddy domain name.

4- I have also edited the A(host) IP to the public ip of my ec2 instance.

I don't know what went wrong, I am unable to access my application via www.mydomainname.com.

Upvotes: 3

Views: 2382

Answers (2)

Aditya Pratap
Aditya Pratap

Reputation: 33

I solved my problem with the help of above answer provide by noname and some google help.

As I have unzipped tomcat so, did some env setup as followed-

  1. in server.xml changed port 8080 to 80

  2. sudo apt-get authbind.

  3. touch /etc/authbind/byport/80.

  4. chmod 500 /etc/authbind/byport/80.

  5. created setenv.sh in /usr/local/tomcat/bin folder.

  6. did entry of CATALINA_OPTS="-Djava.net.preferIPv4Stack=true" and AUTHBIND=yes in setenv.sh

  7. Changed the command to exec authbind --deep "$PRGDIR"/"$EXECUTABLE" start "$@" in place of exec "$PRGDIR"/"$EXECUTABLE" start "$@" in startup.sh

    Then restarted the server and problem solved.

Upvotes: 0

noname
noname

Reputation: 369

In order to ping an EC2 instance, you need to allow ICMP traffic in your security group settings.

Upvotes: 1

Related Questions