How to start Apache on EC2

25,036

Solution 1

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/

Solution 2

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
Share:
25,036
murze
Author by

murze

www.spatie.be

Updated on April 23, 2020

Comments

  • murze
    murze about 4 years

    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
    murze over 13 years
    Your last command results in "No such client module –install" Is there a preconfgured AMI where a LAMP is already installed?
  • Brandon Frohbieter
    Brandon Frohbieter over 13 years
    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.
  • Brandon Frohbieter
    Brandon Frohbieter over 13 years
    sorry, typo. two hyphens, or -i
  • kaysa
    kaysa about 11 years
    Just wanted to mention that BitNami does provide Amazon and Azure cloud images with pre-configured LAMP. bitnami.com/stack/lamp/cloud