Installed lamp on ubuntu server on an ec2 amazon instance, still can't access server through browser with apache running. Why?

不问归期 提交于 2019-12-08 08:53:55

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!