Search code examples
amazon-ec2amazon-web-services

How to launch the web server on Amazon Web Services?


Just started using EC2, launched the instance with Amazon Linux AMI, installed my web app on it...and I thought I was ready to go.

I go to the public DNS they gave me for my instance and nothing happens. I get the Google Chrome "Oops" ...

After re-reading the doc I saw some notes that I need to launch the web server. By doing this:

sudo chkconfig httpd on
sudo service httpd start

But I can't seem to locate these files.

Any ideas what I am doing wrong or where those files are located? The closest I got was /etc but even if I try the command lines from there, I get the same errors.

Thanks for your help.

UPDATE Here is an image of the security group I have for my instance. This is correct right? enter image description here


Solution

  • Which type of webapps(php/java/Ruby etc) you are trying to deploy? If it is php, where you are trying to put in apache directory? For example default root document location in apache is /var/www/html . If you put your webapp inside /var/www/html it should be available through direct url http://x.x.x.x/{nameofwebapp}