<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Website on Niall Donaghy</title>
    <link>https://ndonaghy.com/tags/website/</link>
    <description>Recent content in Website on Niall Donaghy</description>
    <generator>Hugo</generator>
    <language>en-gb</language>
    <lastBuildDate>Tue, 07 Apr 2026 00:43:38 +0100</lastBuildDate>
    <atom:link href="https://ndonaghy.com/tags/website/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>OpenBSD httpd Basic Setup With Auto Index and Cgi</title>
      <link>https://ndonaghy.com/posts/openbsd-httpd-basic-setup-with-auto-index-and-cgi/</link>
      <pubDate>Tue, 07 Apr 2026 00:43:38 +0100</pubDate>
      <guid>https://ndonaghy.com/posts/openbsd-httpd-basic-setup-with-auto-index-and-cgi/</guid>
      <description>&lt;p&gt;Setting up httpd webserver, and you want:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;some static html please&lt;/li&gt;&#xA;&lt;li&gt;display a directory listing autoindex style&lt;/li&gt;&#xA;&lt;li&gt;try a dumb CGI script because why not?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;This is basic tyre-kicking; please read my other posts on making a more complete httpd (and system, for that matter) configuration.&lt;/p&gt;&#xA;&lt;h2 id=&#34;create-a-basic-etchttpdconf&#34;&gt;create a basic /etc/httpd.conf&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;types { include &amp;#34;/usr/share/misc/mime.types&amp;#34; }&#xA;&#xA;server &amp;#34;default&amp;#34; {&#xA;        listen on * port 80&#xA;        root &amp;#34;/htdocs&amp;#34;&#xA;&#xA;        location &amp;#34;/cgi-bin/*&amp;#34; {&#xA;                root &amp;#34;/&amp;#34;&#xA;                fastcgi socket &amp;#34;/run/slowcgi.sock&amp;#34;&#xA;        }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;enable-slow-cgi-on-boot-start-it&#34;&gt;enable slow cgi on boot, start it&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;rcctl enable slowcgi&#xA;rcctl start slowcgi&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;create-our-test-files&#34;&gt;create our test files&lt;/h2&gt;&#xA;&lt;h3 id=&#34;static&#34;&gt;static&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;echo &amp;#34;Hello from OpenBSD httpd.&amp;#34; | tee /var/www/htdocs/index.html&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;cgi&#34;&gt;cgi&lt;/h3&gt;&#xA;&lt;h4 id=&#34;nano-varwwwcgi-binipcgi-and-paste-in&#34;&gt;nano /var/www/cgi-bin/ip.cgi, and paste in:&lt;/h4&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#!/bin/sh&#xA;echo &amp;#34;Content-Type: text/plain&amp;#34;&#xA;echo &amp;#34;&amp;#34;&#xA;echo &amp;#34;Hello from OpenBSD httpd.&amp;#34;&#xA;echo &amp;#34;Your IP is ${REMOTE_ADDR:-unknown}.&amp;#34;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Note: This is for example only; I don&amp;rsquo;t endorse serving up #!/bin/sh via your webserver. :)&lt;/p&gt;</description>
    </item>
    <item>
      <title>OpenBSD httpd TLS Certificate</title>
      <link>https://ndonaghy.com/posts/openbsd-httpd-tls-certificate/</link>
      <pubDate>Mon, 06 Apr 2026 23:24:03 +0100</pubDate>
      <guid>https://ndonaghy.com/posts/openbsd-httpd-tls-certificate/</guid>
      <description>&lt;p&gt;Migrating OpenBSD httpd from HTTP to HTTPS&lt;/p&gt;&#xA;&lt;p&gt;LetsEncrypt offer free TLS certs and have a nice ACME clients to handle auto-renewal. Here&amp;rsquo;s how to implement on OpenBSD, assuming you have your httpd server up and running on port 80 already.&lt;/p&gt;&#xA;&lt;p&gt;For example you might have some basic &lt;code&gt;/etc/httpd&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;types { include &amp;#34;/usr/share/misc/mime.types&amp;#34; }&#xA;&#xA;server &amp;#34;ndonaghy.com&amp;#34; { &#xA;&#x9;listen on * port 80 &#xA;&#x9;root &amp;#34;/htdocs&amp;#34; &#xA;&#x9;location &amp;#34;/stuff/*&amp;#34; { &#xA;&#x9;&#x9;directory { &#xA;&#x9;&#x9;&#x9;auto index&#xA;&#x9;&#x9;} &#xA;&#x9;} &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;step-1-add-acme-challenge-location&#34;&gt;Step 1: Add acme-challenge location&lt;/h2&gt;&#xA;&lt;p&gt;Add this location directive to /etc/httpd.conf:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Hugo</title>
      <link>https://ndonaghy.com/posts/hugo/</link>
      <pubDate>Sun, 05 Apr 2026 00:23:04 +0100</pubDate>
      <guid>https://ndonaghy.com/posts/hugo/</guid>
      <description>&lt;h1 id=&#34;hugo-getting-started&#34;&gt;Hugo: getting started&lt;/h1&gt;&#xA;&lt;h2 id=&#34;install&#34;&gt;Install&lt;/h2&gt;&#xA;&lt;p&gt;There are multiple ways to obtain and install - eg: distro package manager, github binary, compile source.&#xA;Check the docs and choose what works best for you.&lt;/p&gt;&#xA;&lt;p&gt;I am going with a recent binary:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd /tmp&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;wget https://github.com/gohugoio/hugo/releases/download/v0.159.2/hugo_extended_0.159.2_linux-amd64.tar.gz&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;tar -xzf hugo_extended_0.159.2_linux-amd64.tar.gz&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo mv hugo /usr/local/bin/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hugo version&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;create-site&#34;&gt;Create site&lt;/h2&gt;&#xA;&lt;p&gt;Here I am working in my git repo which has an existing README.md file, so use &amp;ndash;force to create despite the directory not being empty:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
