Install Apache on Ubuntu

1. Apache

$ wget http://mirror.bjtu.edu.cn/apache/httpd/httpd-2.2.17.tar.gz
$ tar -xzf httpd-2.2.16.tar.gz
$ cd httpd-2.2.16
$ sudo ./configure --enable-dav --enable-dav-fs --enable-so --enable-ssl --enable-rewrite 
    --enable-dav-lock=shared --enable-maintainer-mode --prefix=/usr/local/apache2 --enable-mods-shared=all
$ make
$ sudo make install


2. Apache Common Tools

$ sudo apt-get install apache2.2-common


3. Configurations for PHP

$ sudo vi /usr/local/apache2/conf/httpd.conf

AddType application/x-httpd-php .php
DirectoryIndex index.php index.htm index.html


4. Run

$ sudo /usr/local/apache2/bin/apachectl -k start
$ firefox http://localhost/

Posted in Apache, Ubuntu | Tagged , | Leave a comment