Install Apache on Ubuntu

1. Apache

[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

$ 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

[/codesyntax]


2. Apache Common Tools
[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

$ sudo apt-get install apache2.2-common

[/codesyntax]


3. Configurations for PHP
[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

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

[/codesyntax]

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


4. Run
[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

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

[/codesyntax]

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