AWS instancega ühenduse saamine

Allikas: Lambda

Toorik korrastamiseks:

https://education.github.com/pack

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html

ubuntu@ec2-52-28-43-138.eu-central-1.compute.amazonaws.com


Get the ID of the instance: mul i-58fc59e4
Get public dns: ec2-52-28-43-138.eu-central-1.compute.amazonaws.com
Get public IP: 52.28.43.138

NB! lihtsalt parooliga sisse ei saagi

sudo passwd root


https://winscp.net/eng/docs/guide_amazon_ec2

to install apache:

sudo apt-get install apache2

do this (unclear if really helps, but does not harm):
sudo adduser ubuntu www-data
sudo chown -R www-data:www-data /var/www
sudo chmod -R g+rw /var/www

certainly works:
sudo chmod a+rw /var/www
sudo chmod a+rw /var/www/html

create a test file /var/www/html/a.html

to access web server in ec2:

management panel: go to security groups 
edit existing security groups: click on them, in the panel below
add rule for http (tcp and port 80)
read
http://stackoverflow.com/questions/15007742/cannot-connect-to-aws-instance-running-apache
official docs is far too complicated:
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html