-1

My environment is: Amazon linux 64 bit

I have a few questions...

  1. I don't know if it's Ubuntu or Red Hat, is there any way to check? And I need to run PHP and MySQL, thus I installed httpd.

  2. is httpd == apache? But on my default page, it says: please upload files to /var/www/html folder.

  3. This is the first time I set AWS EC2 server myself, my previous experience is hosting with hosting company. Normally in hosting company, my web directory is called www or public_html or htdocs. Why is my folder name /var/www/html? Have I installed the wrong Apache?

MrWhite
  • 12,647
  • 4
  • 29
  • 41
heathub
  • 113
  • 1
  • 2
  • 6

1 Answers1

2

1)Use lsb_release

# lsb_release -a
LSB Version:    :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: CentOS
Description:    CentOS release 5.5 (Final)
Release:    5.5
Codename:   Final

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 10.04.2 LTS
Release:    10.04
Codename:   lucid

2)Red Hat/CentOS:

yum install httpd

Debian,Ubuntu:

apt-get install apache2

3)"/var/www/html" in default DocumentRoot in CentOS httpd. Change line in /etc/httpd/conf/httpd.conf:

DocumentRoot "/var/www/html"
ooshro
  • 11,134
  • 1
  • 32
  • 31
  • Thanks for the direction. How do I check my OS version? I tried "cat /etc/issue", the output is "Amazon Linux AMI release 2010.11.1 (beta)", is this a new OS, different from CentOS and Ubuntu? And based on your answers, I assume its okay to NOT have htdocs or www or public_html folder, am I right? – heathub Mar 02 '11 at 04:49
  • Yes, it's okay...Amazon Linux is RHEL5 Linux version ( http://aws.amazon.com/ec2/faqs/#What_is_the_Amazon_Linux_AMI ) – ooshro Mar 02 '11 at 05:00
  • RedHat!!!!!! Okay, my very last question. Is this okay, I mean, as of now(2 March 2011) to use Amazon Linux, cuz its currently on beta stage right?? – heathub Mar 02 '11 at 05:08
  • No, Amazon Linux is stable and secure. – ooshro Mar 02 '11 at 05:36
  • Ubuntu is generally a better option as it's much more heavily used and therefore there's much more support available. Also their repositories have much more software, and it's more up to date than Amazon Linux. I run AL servers, but any I create in future will be Ubuntu 16.04. – Tim Nov 04 '17 at 23:58