Why not login to Qiita and try out its useful features?

We'll deliver articles that match you.

You can read useful information later.

0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

FreeNAS 9.3 jail に h2o をインストール

Last updated at Posted at 2015-12-27

NL54L + FreeNAS に http サーバを仕込みたい。なぜならば、サーバ用マシンが他に無いから:sweat: しかしながら FreeNAS に手を入れたくはありません。というわけで、jail で仮想マシンを作って仕込みます。可能な限り軽量なのが望ましいので、nginx より更に高速と最近噂の h2o をインストールしてみました。

インストール

難しい事は何もありませんでした。 pkg install h2o でOK。

それから /etc/rc.conf の末尾に1行追加。

/etc/rc.conf
h2o_enable="YES"

実験用に用意した設定ファイルは下記。

/usr/local/etc/h2o.conf
user: www
pid-file: /var/run/h2o.pid
access-log: /var/log/h2o/h2o-access.log
error-log: /var/log/h2o/h2o-error.log
listen: 80
file.dirlisting: on
hosts:
  test.example.com:
    paths:
      "/":
        file.dir: "/media/www/test"

FreeNAS で用意したストレージ上に適当なデータセットを作成。それを jail の add storage で /media/www に設定。jail 内で /media/www/test/index.html を用意しました。

DNSサーバに test.example.com を設定し、クライアントマシンからwebブラウザで http://test.example.com/index.html を表示できればOK!:thumbsup:

設定

openssl で鍵ファイルを用意して…とかは後日。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up

Qiita Conference 2025 will be held!: 4/23(wed) - 4/25(Fri)

Qiita Conference is the largest tech conference in Qiita!

Keynote Speaker

ymrl、Masanobu Naruse, Takeshi Kano, Junichi Ito, uhyo, Hiroshi Tokumaru, MinoDriven, Minorun, Hiroyuki Sakuraba, tenntenn, drken, konifar

View event details
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?