apache tutorial - [Ubuntu] Simple Hello World Example in Apache - apache - apache web server - apache server - apache2



[Ubuntu] Simple Hello World Example in Apache

This example will guide you through setting up a back end serving an a Hello World HTML page.

Installing Requirements

  • sudo apt-get install apache2

Setting up the HTML

Apache files live in /var/www/html/. Make sure you're in your root directory first, cd, then cd /var/www/html/.

This html directory is where all your website files will live. Lets quickly make a simple Hello World file.

Using your favorite text editor, type the following in

<!DOCTYPE html>
<html>
<head>
    <title>Hello World!</title>
</head>
<body>
    <h1>Hello World!</h1>
</body>
</html>

Save this file as index.html in the current directory and you're set to go!

Visiting Your Webpage

To visit the page you just created, in your browser of choice, go to localhost. If that doesn't work, try 127.0.0.1. You should see "Hello World!" as a h1. You're done!



Related Searches to [Ubuntu] Simple Hello World Example in Apache