Setting Up a Website

Before You Begin

This guide assumes you have already correctly configured OpenHTTPd and set up TLS.

Finding the Document Root

To set up a website, put files in your document root. You'll want to check /etc/httpd.conf. Here is a sample server block:

server "" {
	listen on * tls port 443
	tls {
		certificate "/etc/ssl/"
		key "/etc/ssl/private/"
	location "/pub/*" {
		directory auto index
	location "/.well-known/acme-challenge/*" {
		root "/acme"
		request strip 2

In this example, the only document root in the configuration is for ACME verification, not for your website. Since the document root is not specified, OpenHTTPd defaults to /htdocs. Since OpenHTTPd runs in a chroot by default, this means your files should go in /var/www/htdocs/.

Creating a Webpage

Create your own webpage by editing /var/www/htdocs/index.html.

Save this page, then load in your web browser to view.

NOTE: Make sure to replace with your actual hostname.

As practice, you can try setting up the following web sites:

CVSWebCVS Code Hosting
Cgit?Git code hosting
GotwebGot code hosting