ahti
currently uses iptables
for this. So you better learn the syntax.
As a quick cheatsheet, you can run sudo iptables -S
to see examples.
TCP port rules live in the TCP
table, UDP port rules in the UDP
table.
Once you have your command ready, say -A TCP -p tcp --dport 22 -j ACCEPT -m comment --comment 'ssh'
, be prepared to do the following:
sudo iptables -A TCP -p tcp --dport 22 -j ACCEPT -m comment --comment 'ssh'
sudo ip6tables -A TCP -p tcp --dport 22 -j ACCEPT -m comment --comment 'ssh'
And then save it all:
sudo rc-service iptables save
sudo rc-service ip6tables save
Take a look at /etc/h2o.conf
. You will want to add your domain under hosts:
.
Draw inspiration from the other domains in the file.
For SSL, make sure that you have the following under your domain’s "/":
:
file.dir: /var/www/certbot
Once you have that, run:
ssl add domain
sudo rc-service h2o reload
so that the new certificates are used.And you should be set.
Take a look at /etc/h2o.conf
. You will likely want to:
mruby.handler-file: /usr/share/h2o/mruby/httpredir.rb
for an automatic HTTP to HTTPS redirect when sent Upgrade-Insecure-Requests: 1
.header.set
.file.dir: /some/directory
, or set up proxying, etc.For more configuration options, see the h2o documentation. As an example:
"/~my/awesome/path":
mruby.handler-file: /usr/share/h2o/mruby/httpredir.rb
header.set: "X-My-Custom-Header: Is Awesome"
file.dir: /home/my/public_html/awesome/path
apk info --who-owns `which usermod`
Ahti, the god of the sea and of fishing, is sometimes portrayed as a man with a handlebar moustache and beard of moss.