proxmox

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
proxmox [2024/01/07 12:47] lehmannproxmox [2024/01/07 22:20] (aktuell) peters
Zeile 10: Zeile 10:
  
 Installation & Konfiguration Nginx Installation & Konfiguration Nginx
-<code>apt update && apt install nginx certbot python3-certbot-nginx</code>+<code>apt update && apt install nginx certbot python3-certbot-nginx apache2-utils</code> 
 + 
 +Generierung eines temporären Snakeoil Cert, dadurch muss später keine config erneut angepasst werden 
 +<code> 
 +openssl req -x509 -nodes -days 1 -newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt 
 +</code>
  
 <code>nano /etc/nginx/sites-available/DOMAINNAME.conf</code> <code>nano /etc/nginx/sites-available/DOMAINNAME.conf</code>
 <code> <code>
-listen 80; +server { 
-server_name DOMAINNAME;+   listen 80; 
 +   server_name DOMAINNAME;
  
-access_log /var/log/nginx/access_DOMAINNAME.log +   access_log /var/log/nginx/access_DOMAINNAME.log 
-error_log /var/log/nginx/access_DOMAINNAME.log+   error_log /var/log/nginx/access_DOMAINNAME.log
  
-proxy_redirect off; +   proxy_redirect off; 
-location / { +   location / { 
-   proxy_http_version 1.1; +      proxy_http_version 1.1; 
-   proxy_set_header Upgrade $http_upgrade; +      proxy_set_header Upgrade $http_upgrade; 
-   proxy_set_header Connection "upgrade"; +      proxy_set_header Connection "upgrade"; 
-   proxy_pass https://127.0.0.1:8006; +      proxy_pass https://127.0.0.1:8006; 
-   proxy_buffering off; +      proxy_buffering off; 
-   client_max_body_size 0; +      client_max_body_size 0; 
-   proxy_connect_timeout 3600s; +      proxy_connect_timeout 3600s; 
-   proxy_read_timeout 3600s; +      proxy_read_timeout 3600s; 
-   proxy_send_timeout 3600s; +      proxy_send_timeout 3600s; 
-   send_timeout 3600;+      send_timeout 3600;
        
-   auth_basic "418"; +      auth_basic "418"; 
-   auth_basic_user_file /etc/nginx/.htpasswd_SERVERNAME;+      auth_basic_user_file /etc/nginx/.htpasswd_SERVERNAME; 
 +   }
 } }
 +</code>
 +<code>
 +htpasswd -c /etc/nginx/.htpasswd_SERVERNAME NUTZERNAME
 </code> </code>
 <code> <code>
Zeile 42: Zeile 52:
 </code> </code>
  
 +Wenn der Zugriff nun mittels Domainnamen im Webbrowser geschieht, per HTTP, sollte das Interface der Proxmox Konsole angezeigt werden. Certbot hilft uns, die Verbindung per SSL einzurichten sowie das Zertifikat automatisch zu aktualisieren. 
 +
 +<code>certbot --register-unsafely-without-email --nginx -d DOMAINNAME</code>
 +
 +Jetzt wird der Zugriff automatisch auf HTTPS weitergeleitet, um eine sichere Verbindung zu gewährleisten. Als Letztes muss nun der Zugriff auf dem Port 8006 auf das Interface untersagt werden. 
  
 <code>nano /etc/default/pveproxy</code> <code>nano /etc/default/pveproxy</code>
  • proxmox.1704631629.txt.gz
  • Zuletzt geändert: 2024/01/07 12:47
  • von lehmann