けけずんセルフハッキング

エンジニアっぽい雰囲気を醸しだしているかのようなブログです!

memo: nginxを動かす最小限の設定

/etc/nginx/nginx.conf を以下のように編集する。

pid /var/run/nginx.pid;

events {
    worker_connections 3;
}

http {
    server {
        root /html;
    }
}

nginxを再起動する。

$ nginx -s stop && nginx

このとき、 http://localhost へアクセスすると /html以下のファイルにアクセスできていることが分かる。