Tuesday, March 16, 2010

Running apache2 server on ubuntu and tracking its activity..

This is a simple guide to install and run apache2 server on ubuntu and track the server activity while it is running.

Install apache2 server on ubuntu through terminal..

sudo apt-get install apache2


Track server by running following command in a separate terminal

tail -f /var/log/apache2/error.log

now you can see the server activity being logged in this terminal.

Start apache2 server

cd /etc/init.d
sudo ./apache2 start

You can also do

sudo ./apache2 --help

to view all available commands.

Now go to http://localhost in your browser

The message 'It works!' will be displayed. (the file displayed is index.html in /var/www folder)