fachinformatiker-wiki

it's easy when it's here

User Tools

Site Tools


linux:webhosting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:webhosting [2023/05/15 12:24] – adminlinux:webhosting [2026/10/25 15:43] (current) – gsys
Line 20: Line 20:
  
 ==== Generate Credentials ==== ==== Generate Credentials ====
 +:!: insecure default MD5
 <code> <code>
-htpasswd -n werner                                # generate cerdentials for user "werner" and display the results  +htpasswd -n testuser                                # generate cerdentials for user "werner" and display the results  
-                                                  # on standard output rather than updating a file +                                                    # on standard output rather than updating a file 
-htpasswd -c ~/public_html/.htpasswd werner        # generate ".htpasswd" file and create credentials for user "werner" +htpasswd -c ~/public_html/.htpasswd testuser        # generate ".htpasswd" file and create credentials for user "werner" 
-htpasswd ~/public_html/.htpasswd werner           # create or modify credentials for user "werner" in ".htpasswd" file+htpasswd ~/public_html/.htpasswd testuser           # create or modify credentials for user "werner" in ".htpasswd" file 
 +</code> 
 + 
 +:-) secure bcrypt 
 +<code> 
 +htpasswd -nBC 10 testuser 
 +#        -n        Show ouput on stdout 
 +#         -B       Use bcrypt encryption algorithm 
 +#          -C 10   Computing time used for the bcrypt algorithm (higher is more secure but slower, default: 5, valid: 4 to 17)
 </code> </code>
  
 === Traefik === === Traefik ===
  
-** Don't forget to escape dollar signs ($ -> $$) in traefik docker compose files! **+**Don't forget to escape dollar signs ($ -> $$) in traefik docker compose files!**
  
 use this command: use this command:
Line 40: Line 49:
 <code> <code>
 ... ...
- 
     labels:     labels:
       - "traefik.enable=true"       - "traefik.enable=true"
       - "traefik.docker.network=traefik-prod"       - "traefik.docker.network=traefik-prod"
       - "traefik.http.services.nginx-web-prod.loadbalancer.server.port=8180"       - "traefik.http.services.nginx-web-prod.loadbalancer.server.port=8180"
 +      - "traefik.http.routers.nginx-web-prod.middlewares=basicauth-prod"
       - "traefik.http.middlewares.basicauth-prod.basicauth.users=werner:$$apr1$$3FS0FG.s$$rc0h/7C36ABYDS45XKEQ."       - "traefik.http.middlewares.basicauth-prod.basicauth.users=werner:$$apr1$$3FS0FG.s$$rc0h/7C36ABYDS45XKEQ."
- 
 ... ...
 </code>  </code> 
linux/webhosting.1684146248.txt.gz · Last modified: (external edit)