问题
I started an instance on amazon ec2, ami is ubuntu 14.04. I followed the steps on https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html exactly up until "Transferring Files to Your Linux Instance Using the PuTTY Secure Copy Client" Since I don't need to put files on there just yet. Then I followed the following: https://help.ubuntu.com/community/ApacheMySQLPHP.
"To install the default LAMP stack in Ubuntu 10.04 and above First refresh your package index...
$ sudo apt-get update
... and then install the LAMP stack:
$ sudo apt-get install lamp-server^
Mind the caret (^) at the end. "
After that I tried
sudo /etc/init.d/apache2 restart
After which ubuntu said: httpd (pid 5549) already running
Yet when I try to browse with chrome to the public ip which shows in the amazon console I get
This webpage is not available
ERR_CONNECTION_TIMED_OUT
In my browser. What am I doing wrong?
回答1:
check your security group settings. What are the inbound rules? You need to add the IP(s) from where you are opening the web browser in the inbound rules. Also, check whether you are using private IP or public IP on the browser. You need to use public IP.
来源:https://stackoverflow.com/questions/34177403/installed-lamp-on-ubuntu-server-on-an-ec2-amazon-instance-still-cant-access-se