0

After trying to retrofit an existing Ubuntu Raring Amazon EC2 node to support Drupal (see PHP5 is installed, but Apache is displaying PHP as uninterpreted text. How can I get it to process it as PHP?), I decided to start with a fresh start and use tasksel install lamp-server, which I was concerned might clobber something. I tried to follow https://help.ubuntu.com/community/Drupal , installing Drupal 7 from repositories, and an apachectl restart runs with apparent success, but when I try to connect to the FQDN I use to shell in, from a web browser, Chrome says, "Oops! Google Chrome could not connect to ec2-54-218-143-2.us-west-2.compute.amazonaws.com".

Could you point me to a preferred HOWTO to create a node running Drupal (as well as being able to support VirtualHosts with CGI scripts as well as static content)? Is there a not-obviously-advertised way to load an image on a host that will run Drupal?

--EDIT--

Pasting in the security group ports for the instance:

22 (SSH)    0.0.0.0/0   Delete
80 (HTTP)   0.0.0.0/0   Delete

In other words, Amazon claims that it is allowing connections in on port 80.

4
  • Does your security group allow HTTP access?
    – SunSparc
    Jul 15, 2013 at 16:29
  • Yes; thank you. The security group is quick-start-1, which is also the security group for the instance for JonathansCorner.com. In both cases I have not touched the default settings and specifically have not adjusted firewall settings. Jul 15, 2013 at 16:33
  • When I do telnet ec2-54-218-143-2.us-west-2.compute.amazonaws.com 80 I get connection refused. I Apache actually runnning? Have you checked the Apache logs?
    – SunSparc
    Jul 15, 2013 at 17:15
  • Apache was dying on restart because it could not find /var/log/httpd. When that was addressed, however, things were not all better. Now I have one root and six www-data Apache2 racehorses Raring to go, but I can only telnet to 80 from localhost. Jul 15, 2013 at 21:01

1 Answer 1

1

You need to change your security group settings to allow inbound traffic on port 80. I also typically use ufw on the server as a firewall.

My list for spinning up a drupal server on AWS are:

  1. Spin up t1.micro instance
  2. Change security group to allow http(80), https(443), ssh(22), ftp(21).
  3. Set up ufw on server to allow http(80), https(443), ssh(22), ftp(21)
  4. install default lamp server
  5. install proftpd
  6. create ftp user and assign home directory of /var/www
  7. assign an elastic IP to the instance in the aws control panel

After you do this and get the updates (apt-get upgrade), you should have a pretty good shell for a basic web server.

Now you should be able to go to: ec2-54-218-143-2.us-west-2.compute.amazonaws.com and get an It Works! page. The most common issue is always the elastic IP or security group access.

If you have issues, message me and I can help out a little more or do a webex and show you around aws....super bored at work today...

6
  • I have http (80) and ssh, including sftp (22) - we should be using sftp over ftp on pain of sending plaintext credentials over the network. ufw is installed. How can configure it (or uninstall the server firefwall represented by UFW, seeing as its security group sets the permissions I want?) Jul 15, 2013 at 20:31
  • I tried "ufw allow 80" as superuser, but that resulted in the behavior of port 80 being open for connections from localhost but not from my workstation. Jul 15, 2013 at 20:33
  • have you done ufw enable? Changed the security group to allow port 80 traffic? Jul 15, 2013 at 21:03
  • The security group allows 80 and 22. Jul 15, 2013 at 21:04
  • Seems to be working for me now. I can access on 80 via a browser. I can access via telnet:telnet ec2-54-218-143-2.us-west-2.compute.amazonaws.com 80 Trying 54.218.143.2... Connected to ec2-54-218-143-2.us-west-2.compute.amazonaws.com. Escape character is '^]'. Get / <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>501 Method Not Implemented</title> </head><body> <h1>Method Not Implemented</h1> <p>Get to /index.html not supported.<br /> </p> <hr> <address>Apache/2.2.22 (Ubuntu) Server at ip-10-249-23-149.us-west-2.compute.internal Port 80</address> </body></html> Jul 15, 2013 at 21:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .