AWS Level 3 Task 01

Unable to complete the task 01
" Web application is not able to connect to the Database."

verified connectivity by logging with the sql username to DB from EC2.

Need help on completing the task


I am able to connect to the the rds from the ec2

but still it show the default page

Need help wasted alot of time

Thanks for the no help.

able to figure it out. maybe this could help someone

you have to change the DirectoryIndex (order of index.php)order defined in apache config.

/etc/apache2/mods-enabled/dir.conf

Should be

“DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm”

And dbname can be given after creating the RDS instance from EC2 instance.

  1. first connect to RDS from EC2

mysql -h <<>> -u <<>> -p

  1. then give db name

CREATE DATABASE <<>>;