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!

5 Answers 5

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 
Sign up to request clarification or add additional context in comments.

Comments

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/

4 Comments

Your last command results in "No such client module –install" Is there a preconfgured AMI where a LAMP is already installed?
I don't believe so, you may have to follow a tutorial online to get the stack set up. Don't worry, after a few tries, you'll have the hang of it for good.
sorry, typo. two hyphens, or -i
Just wanted to mention that BitNami does provide Amazon and Azure cloud images with pre-configured LAMP. bitnami.com/stack/lamp/cloud
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.

Comments

0

sudo apt-get update sudo tasksel

and enjoy.

Comments

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.