← Back to blog
bpdubuntu

How to Host Your First Simple Web Page with Apache on Ubuntu

15 October 2025bpd · ubuntu

From a Blank Server to a Live Web Page

The ‘Ubuntu System Administration Guide’ provides a clear, step-by-step tutorial on how to serve your first static HTML page using the Apache web server.

The Process

  1. Create a Web Root: First, you’ll create a directory for your application’s files, for example, `/var/www/html/myapp`.
  2. Create an `index.html` File: Inside your new directory, you’ll create a basic `index.html` file. This is the default file that a web server looks for when a visitor accesses a directory.
  3. Configure Apache: You’ll then edit Apache’s default site configuration file (`/etc/apache2/sites-available/000-default.conf`). The key change is updating the `DocumentRoot` directive to point to your new application directory:
    DocumentRoot /var/www/html/myapp
  4. Restart and View: After restarting the Apache service (`systemctl restart apache2`), you can open a web browser and navigate to your server’s IP address to see your ‘Hello’ page live on the internet.

This post is based from content of the book Ubuntu System adminstration guide. And the book can be found here https://www.amazon.com/stores/Mattias-Hemmingsson/author/B0FF5CQX13