Skip to content

Commit

Permalink
add http basic auth to tinypilot
Browse files Browse the repository at this point in the history
  • Loading branch information
aetonsi committed Dec 29, 2023
1 parent 5e93a49 commit 951e03f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions sysadmin/rpi-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,23 @@ curl \
bash - && \
sudo reboot
```

#### 6.1 add HTTP basic auth to TinyPilot

```shell
# https://www.digitalocean.com/community/tutorials/how-to-set-up-password-authentication-with-nginx-on-ubuntu-14-04
sudo sh -c "echo -n 'sammy:' >> /etc/nginx/.htpasswd"
sudo sh -c "openssl passwd -apr1 >> /etc/nginx/.htpasswd"
cat /etc/nginx/.htpasswd
```

... in `/etc/nginx/conf.d/tinypilot.conf`:

```config
server {
location / {
auth_basic "Restricted Content";
auth_basic_user_file /etc/nginx/.htpasswd;
}
}
```

0 comments on commit 951e03f

Please sign in to comment.