Install apache2 server on ubuntu through terminal..
sudo apt-get install apache2
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)