sudo apt-get update
sudo apt-get install apache2
After the installation, the web server automatically runs up. You might see the following message.
Setting up apache2-mpm-worker (2.2.22-13) ...
[....] Starting web server: apache2apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
Setting up apache2 (2.2.22-13) ...
Setting up ssl-cert (1.0.32) ...
If you feel uncomfortable with this message, create a file in following way.
echo "ServerName localhost" | tee /etc/apache2/conf.d/fqdn
Then restart the web server.
sudo /etc/init.d/apache2 restart
Accessing your raspberry pi via your web browser, you will see the following message.
You can change the content by editing /var/www/index.html. Enjoy!