9

I'm an absolute newbie to EC2. My goal is to run a php-mysql-website on EC2.

I've just setup a new instance based on this ami

It seems that apache isn't running? How do I start apache? Is there a general tutorial on how to start EC2 as a web server?

Thanks!

murze
  • 4,015
  • 8
  • 43
  • 70

5 Answers5

9

It really depends on the distribution you have chosen. Typically, though, you can start Apache using the init scripts. For example, on Ubuntu server it will be:

sudo /etc/init.d/apache2 start

On CentOS or Redhat it might be:

sudo /etc/init.d/httpd start
scientastic
  • 171
  • 1
  • 4
7

For Suse 11, try

 rcapache2 status
 rcapache2 start

If it is not installed, you can install with

yast2 --install apache2

for a tutorial on LAMP with this server, check

http://www.susegeek.com/internet-browser/install-configure-lamp-apachemysqlphp-in-opensuse-110/

Brandon Frohbieter
  • 17,563
  • 3
  • 40
  • 62
0

sudo apt-get update sudo tasksel

and enjoy.

Brij Raj Singh - MSFT
  • 4,903
  • 7
  • 36
  • 55
0

If you are running bitnami's Drupal Stack, you can

1) cd /opt/bitnami 2) sudo bash (enter password) 3) sh ctlscript.sh restart

this will restart the LAMP stack

Paul Preibisch
  • 4,115
  • 2
  • 27
  • 32
0

Well, you need to set up a LAMP server. To install LAMP server with one command, try the following:

sudo apt-get install lamp-server^ 

Note that the last ^ is not a typo, it's included in the command. See this page for more information.

Marvin Pinto
  • 30,138
  • 7
  • 37
  • 54
Hasanavi
  • 8,455
  • 2
  • 29
  • 35