0
1

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 3 years have passed since last update.

Raspbirry Pi OS に NGINX をインストールする

Last updated at Posted at 2020-12-30

環境

Raspberry Pi 2 Model B
Raspberry Pi OS Lite

nginxをインストール

すべて以下のサイト通り、、(忘備録ですみません)
(参考:http://igarashi-systems.com/sample/translation/raspberry-pi/remote/remote-web-server-nginx.html

$ sudo apt install nginx

サーバを起動

$sudo /etc/init.d/nginx start

Raspberry Pi OS 上の場合、http://localhost/を開く。
同じネットワーク上の別のコンピュータからの場合、RapberryPiOSのIPアドレス(例:http://192.168.1.10)を開く。

「RapberryPiOSのIPアドレス」を調べる方法は以下の通り、

$ hostname -I

WEBページの変更

NGINXのWEBページは、/etc/nginx/sites-enabled/defaultに書かれているところを表示する。

   root /var/www/html;

上記の場合、/var/www/html内に、置かれた物が公開される。
自分の場合、ここにはindex.nginx-debian.htmlが置かれており、これがデフォルト表示されていた。(これを変更すれば、表示が変わる)
(参考:https://k-koh.hatenablog.com/entry/2019/11/08/100158

0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?