20240212183719 Raspi4でnginxを設定する
インストール
$ sudo apt install nginx
設定
$ sudo nano /etc/nginx/sites-available/default
quartzを使いたいので、 try_filesの所をこんな感じに変える。
try_files $uri $uri.html $uri/ =404;
起動
$ sudo systemctl daemon-reload
$ sudo systemctl enable nginx
$ sudo systemctl start nginx
$ sudo systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; preset: enabled)
Active: active (running) since Mon 2024-02-12 17:00:43 JST; 1h 46min ago
Docs: man:nginx(8)
Main PID: 7830 (nginx)
Tasks: 5 (limit: 3918)
CPU: 149ms
CGroup: /system.slice/nginx.service
├─7830 "nginx: master process /usr/sbin/nginx -g daemon on; master_process on;"
├─7831 "nginx: worker process"
├─7832 "nginx: worker process"
├─7833 "nginx: worker process"
└─7834 "nginx: worker process"
Feb 12 17:00:43 saipi4 systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...
Feb 12 17:00:43 saipi4 systemd[1]: Started nginx.service - A high performance web server and a reverse proxy server.
こんな感じで動いてればOKかも。Chromeはhttpが使えないので、firefoxとかで確認。