linux:webhosting
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linux:webhosting [2020/11/24 23:09] – admin | linux:webhosting [2026/10/25 15:43] (current) – gsys | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Webhosting | + | ====== Webhosting |
| < | < | ||
| Line 8: | Line 8: | ||
| sudo systemctl restart nginx | sudo systemctl restart nginx | ||
| </ | </ | ||
| + | |||
| + | ===== htpasswd ===== | ||
| + | |||
| + | Generate Basic Auth Credentials | ||
| + | |||
| + | ==== Installation ==== | ||
| + | < | ||
| + | sudo apt update | ||
| + | sudp apt install htpasswd | ||
| + | </ | ||
| + | |||
| + | ==== Generate Credentials ==== | ||
| + | :!: insecure default MD5 | ||
| + | < | ||
| + | htpasswd -n testuser | ||
| + | # on standard output rather than updating a file | ||
| + | htpasswd -c ~/ | ||
| + | htpasswd ~/ | ||
| + | </ | ||
| + | |||
| + | :-) secure bcrypt | ||
| + | < | ||
| + | htpasswd -nBC 10 testuser | ||
| + | # -n Show ouput on stdout | ||
| + | # | ||
| + | # -C 10 | ||
| + | </ | ||
| + | |||
| + | === Traefik === | ||
| + | |||
| + | **Don' | ||
| + | |||
| + | use this command: | ||
| + | |||
| + | < | ||
| + | echo $(htpasswd -nB werner) | sed -e s/ | ||
| + | </ | ||
| + | |||
| + | in the docker compose file: | ||
| + | < | ||
| + | ... | ||
| + | labels: | ||
| + | - " | ||
| + | - " | ||
| + | - " | ||
| + | - " | ||
| + | - " | ||
| + | ... | ||
| + | </ | ||
linux/webhosting.1606255797.txt.gz · Last modified: (external edit)