version=pmwiki-2.2.130 ordered=1 urlencoded=1 agent=w3m/0.5.3+git20210102 author=jrmu charset=UTF-8 csum= ctime=1649025763 host=38.87.162.154 name=Openhttpd.Website rev=7 targets=Openhttpd.Configure,Openhttpd.Tls,Chroot.Intro,Pmwiki.Install,Dokuwiki.Install,Cvs.Cvsweb,Cgit.Install,Gotweb.Install,Paster.Install,Squirrelmail.Install,Wordpress.Install text=(:title Setting Up a Website:)%0a%0a!! Before You Begin%0a%0aThis guide assumes you have already correctly [[openhttpd/configure|configured OpenHTTPd]] and set up [[openhttpd/tls|TLS]].%0a%0a!! Finding the Document Root%0a%0aTo set up a website, put files in your document root. You'll want to check @@/etc/httpd.conf@@. Here is a sample server block:%0a%0a[@%0aserver "example.com" {%0a listen on * tls port 443%0a tls {%0a certificate "/etc/ssl/example.com.fullchain.pem"%0a key "/etc/ssl/private/example.com.key"%0a }%0a location "/pub/*" {%0a directory auto index%0a }%0a location "/.well-known/acme-challenge/*" {%0a root "/acme"%0a request strip 2%0a }%0a}%0a@]%0a%0aIn 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/intro|chroot]] by default, this means your files should go in @@/var/www/htdocs/@@.%0a%0a!! Creating a Webpage%0a%0aCreate your own webpage by editing @@/var/www/htdocs/index.html@@.%0a%0aSave this page, then load https://example.com/index.html in your web browser to view.%0a%0a'''NOTE''': Make sure to replace @@example.com@@ with your actual hostname.%0a%0aAs practice, you can try setting up the following web sites:%0a%0a|| border=1 width=100%25 class="sortable simpletable"%0a||! Name ||! Type ||%0a|| [[pmwiki/install|pmwiki]] || wiki ||%0a|| [[Dokuwiki/install|Dokuwiki]] || wiki ||%0a|| [[Cvs.Cvsweb|CVSWeb]] || CVS Code Hosting ||%0a|| [[Cgit/Install|Cgit]] || Git code hosting ||%0a|| [[Gotweb/Install|Gotweb]] || Got code hosting ||%0a|| [[Paster.Install|Paster]] || Pastebin ||%0a|| [[Squirrelmail/Install|Squirrelmail]] || Webmail ||%0a|| [[Wordpress/Install|Wordpress]] || Blog ||%0a time=1649026992 title=Setting Up a Website author:1649026992=jrmu diff:1649026992:1649026853:=32c32%0a%3c Create your own webpage by editing @@/var/www/htdocs/index.html@@.%0a---%0a> Create your own webpage by editing @@/var/www/htdocs/index.html@@. Here is a sample page:%0a host:1649026992=38.87.162.154 author:1649026853=jrmu diff:1649026853:1649026719:=40,49c40,47%0a%3c || border=1 width=100%25 class="sortable simpletable"%0a%3c ||! Name ||! Type ||%0a%3c || [[pmwiki/install|pmwiki]] || wiki ||%0a%3c || [[Dokuwiki/install|Dokuwiki]] || wiki ||%0a%3c || [[Cvs.Cvsweb|CVSWeb]] || CVS Code Hosting ||%0a%3c || [[Cgit/Install|Cgit]] || Git code hosting ||%0a%3c || [[Gotweb/Install|Gotweb]] || Got code hosting ||%0a%3c || [[Paster.Install|Paster]] || Pastebin ||%0a%3c || [[Squirrelmail/Install|Squirrelmail]] || Webmail ||%0a%3c || [[Wordpress/Install|Wordpress]] || Blog ||%0a---%0a> [[pmwiki/install|wiki]]%0a> [[Cvs.Cvsweb|CVSWeb]]%0a> [[Paster.Install|Paster]]%0a> [[Dokuwiki/install|Dokuwiki]]%0a> [[Squirrelmail/Install|Squirrelmail]]%0a> [[Wordpress/Install|Wordpress]]%0a> [[Cgit/Install|Cgit]]%0a> [[Gotweb/Install|Gotweb]]%0a host:1649026853=38.87.162.154 author:1649026719=jrmu diff:1649026719:1649026407:=9,10c9,10%0a%3c 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:%0a%3c %0a---%0a> To set up a website, put files in your document root. You'll want to check @@/etc/httpd.conf@@:%0a> %0a13,16c13,16%0a%3c listen on * tls port 443%0a%3c tls {%0a%3c certificate "/etc/ssl/example.com.fullchain.pem"%0a%3c key "/etc/ssl/private/example.com.key"%0a---%0a> listen on * port 80%0a> location "/.well-known/acme-challenge/*" {%0a> root "/acme"%0a> request strip 2%0a18,19c18,19%0a%3c location "/pub/*" {%0a%3c directory auto index%0a---%0a> location * {%0a> block return 302 "https://$HTTP_HOST$REQUEST_URI"%0a21,24d20%0a%3c location "/.well-known/acme-challenge/*" {%0a%3c root "/acme"%0a%3c request strip 2%0a%3c }%0a25a22,36%0a> %0a> server "example.com" {%0a> listen on * tls port 443%0a> tls {%0a> certificate "/etc/ssl/example.com.fullchain.pem"%0a> key "/etc/ssl/private/example.com.key"%0a> }%0a> location "/pub/*" {%0a> directory auto index%0a> }%0a> location "/.well-known/acme-challenge/*" {%0a> root "/acme"%0a> request strip 2%0a> }%0a> }%0a28c39%0a%3c 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/intro|chroot]] by default, this means your files should go in @@/var/www/htdocs/@@.%0a---%0a> In this case, the only document root in the configuration is for ACME verification, not for your website. So, since the document root is not specified, OpenHTTPd defaults to @@/htdocs@@. Since OpenHTTPd runs in a [[chroot/intro|chroot]] by default, this means your files should go in @@/var/www/htdocs/@@.%0a host:1649026719=38.87.162.154 author:1649026407=jrmu diff:1649026407:1649026324:=44,47d43%0a%3c %0a%3c Save this page, then load https://example.com/index.html in your web browser to view.%0a%3c %0a%3c '''NOTE''': Make sure to replace @@example.com@@ with your actual hostname.%0a host:1649026407=38.87.162.154 author:1649026324=jrmu diff:1649026324:1649026096:=1,10c1,2%0a%3c (:title Setting Up a Website:)%0a%3c %0a%3c !! Before You Begin%0a%3c %0a%3c This guide assumes you have already correctly [[openhttpd/configure|configured OpenHTTPd]] and set up [[openhttpd/tls|TLS]].%0a%3c %0a%3c !! Finding the Document Root%0a%3c %0a%3c To set up a website, put files in your document root. You'll want to check @@/etc/httpd.conf@@:%0a%3c %0a---%0a> To set up a website, put files in your document root.%0a> %0a39,43c31%0a%3c In this case, the only document root in the configuration is for ACME verification, not for your website. So, since the document root is not specified, OpenHTTPd defaults to @@/htdocs@@. Since OpenHTTPd runs in a [[chroot/intro|chroot]] by default, this means your files should go in @@/var/www/htdocs/@@.%0a%3c %0a%3c !! Creating a Webpage%0a%3c %0a%3c Create your own webpage by editing @@/var/www/htdocs/index.html@@. Here is a sample page:%0a---%0a> In this example, the document root is not specified, so the default is @@/htdocs@@. Since OpenHTTPd runs in a [[chroot/intro|chroot]] by default, this means your files should go in @@/var/www/htdocs/@@.%0a host:1649026324=38.87.162.154 author:1649026096=jrmu diff:1649026096:1649025763:=32,42d31%0a%3c %0a%3c As practice, you can try setting up the following web sites:%0a%3c %0a%3c [[pmwiki/install|wiki]]%0a%3c [[Cvs.Cvsweb|CVSWeb]]%0a%3c [[Paster.Install|Paster]]%0a%3c [[Dokuwiki/install|Dokuwiki]]%0a%3c [[Squirrelmail/Install|Squirrelmail]]%0a%3c [[Wordpress/Install|Wordpress]]%0a%3c [[Cgit/Install|Cgit]]%0a%3c [[Gotweb/Install|Gotweb]]%0a host:1649026096=38.87.162.154 author:1649025763=jrmu diff:1649025763:1649025763:=1,31d0%0a%3c To set up a website, put files in your document root.%0a%3c %0a%3c [@%0a%3c server "example.com" {%0a%3c listen on * port 80%0a%3c location "/.well-known/acme-challenge/*" {%0a%3c root "/acme"%0a%3c request strip 2%0a%3c }%0a%3c location * {%0a%3c block return 302 "https://$HTTP_HOST$REQUEST_URI"%0a%3c }%0a%3c }%0a%3c %0a%3c server "example.com" {%0a%3c listen on * tls port 443%0a%3c tls {%0a%3c certificate "/etc/ssl/example.com.fullchain.pem"%0a%3c key "/etc/ssl/private/example.com.key"%0a%3c }%0a%3c location "/pub/*" {%0a%3c directory auto index%0a%3c }%0a%3c location "/.well-known/acme-challenge/*" {%0a%3c root "/acme"%0a%3c request strip 2%0a%3c }%0a%3c }%0a%3c @]%0a%3c %0a%3c In this example, the document root is not specified, so the default is @@/htdocs@@. Since OpenHTTPd runs in a [[chroot/intro|chroot]] by default, this means your files should go in @@/var/www/htdocs/@@.%0a host:1649025763=38.87.162.154