Table of Contents

1. Things you can do with your ~/publichtml

1.1. What is a userdir?

The apache config now has a UserDir directive which means that it will serve content that's located in your ~/publichtml directory. To access any files that you place in there all you need to do is go to<username>/<my-html-file.html>.

1.2. Serve static content

You can just put files in your ~/publichtml and they will get picked up immediately.

Here's what mine looks like.

~/public_html$ ls -R1


You can view this website at

Here's what the index.html looks like

<!-- ./index.html -->
                <link rel="stylesheet" href="style.css">
                <h1>Hello world</h1>
                <p>UserDir works, yay!</p>

Here's the style.css that index.html refers to.

/* ./style.css */
body {
    background-color: burlywood;

1.3. Serving static content that you've generated

Managing lots of pages manually can be difficult so someone invented static site generators. A static site generator will take in a number of posts written in an easier to edit format like markdown and use them create a website with everything nicely laid out with a theme and maybe even an rss feed.

Whichever static site generator you end up using the result should be a folder whose contents you can serve on a static webserver. All these files can be uploaded to ~/publichtml.

A command like the following should serve well for most purposes. Tailor it to your needs and look in the man page for rsync for help

rsync --delete -rav -e "ssh -p <yourportgoeshere>" website/

Author: Jordan Russell

Created: 2023-03-06 Mon 17:35