Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| projects:internetofthings:iotaiuto [2019/07/03 10:52] – [CONFIGURAZIONE BROADLINK RM Mini3 /RM2] denfra | projects:internetofthings:iotaiuto [2020/08/21 10:31] (current) – [CREAZIONE + INSTALLAZIONE + ATTIVAZIONE servizio "OPENVPN" linux client + relativo CERTIFICATO] roberto | ||
|---|---|---|---|
| Line 117: | Line 117: | ||
| ==== CREAZIONE + INSTALLAZIONE + ATTIVAZIONE servizio " | ==== CREAZIONE + INSTALLAZIONE + ATTIVAZIONE servizio " | ||
| + | |||
| + | <code bash> | ||
| + | # 1. ricordarsi di aggiornare il file users.yaml sul server di iotaiuto.it con il nuovo utente e relativo ipaddr | ||
| + | # 2. eseguire poi i comandi "sctl restart cloud" + "sctl status cloud" per recepire il nuovo utente | ||
| + | # 3. chiedere a Igor di inserire il nuovo utente ed il suo nuovo ipaddr nel file dove sono censiti i DNS operanti | ||
| + | # in iotaiuto.it | ||
| Line 214: | Line 220: | ||
| # nella modalità TERMINALE di RASPBIAN e svolgendo i seguenti passi: | # nella modalità TERMINALE di RASPBIAN e svolgendo i seguenti passi: | ||
| - | # 2.1 installazione applicazione BROADLINK con versione di crittografia 0.10 (obbligatoria altrimenti non funziona) | + | # 2.1 installazione applicazione BROADLINK con versione di crittografia 0.10 (obbligatoria altrimenti |
| + | |||
| + | # | ||
| # 2.2 configurazione dispositivo BROADLINK perchè acceda alla rete WIFI domestica | # 2.2 configurazione dispositivo BROADLINK perchè acceda alla rete WIFI domestica | ||
| Line 307: | Line 315: | ||
| # sul BROADLINK) e così di seguito per VOLUME+ VOLUME- CANALE+ CANALE- | # sul BROADLINK) e così di seguito per VOLUME+ VOLUME- CANALE+ CANALE- | ||
| + | |||
| + | |||
| + | |||
| + | # il file che occorre aggiornare si trova in: / | ||
| </ | </ | ||
| - | **# il file switch.yaml da aggiornare con le stringhe di cui sopra si trova al link: [[projects: | + | ==== Creazione Virtualhost ==== |
| - | ** | + | |
| + | Esempio pratico: __voglio creare un punto di ingresso per '' | ||
| + | In ''/ | ||
| + | < | ||
| + | # Questo è l' | ||
| + | server { | ||
| + | # PUNTO 1 | ||
| + | server_name roby.iotaiuto.it; | ||
| + | listen 80; | ||
| + | return 301 https:// | ||
| + | } | ||
| + | |||
| + | # Questo è l' | ||
| + | server { | ||
| + | listen 443 ssl http2; | ||
| + | # PUNTO 2 | ||
| + | server_name roby.iotaiuto.it; | ||
| + | |||
| + | ssl_certificate / | ||
| + | ssl_certificate_key / | ||
| + | ssl_dhparam / | ||
| + | |||
| + | add_header Strict-Transport-Security " | ||
| + | ssl on; | ||
| + | ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | ||
| + | ssl_ciphers " | ||
| + | ssl_prefer_server_ciphers on; | ||
| + | ssl_session_cache shared: | ||
| + | |||
| + | proxy_buffering off; | ||
| + | |||
| + | location / { | ||
| + | # PUNTO 3 | ||
| + | proxy_pass http:// | ||
| + | proxy_set_header Host $host; | ||
| + | proxy_redirect http:// https://; | ||
| + | proxy_http_version 1.1; | ||
| + | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
| + | proxy_set_header Upgrade $http_upgrade; | ||
| + | proxy_set_header Connection $connection_upgrade; | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | Dopo di che eseguire un check della configurazione | ||
| + | |||
| + | <code bash> | ||
| + | root@homeassistant:/ | ||
| + | nginx: the configuration file / | ||
| + | nginx: configuration file / | ||
| + | </ | ||
| + | |||
| + | e in caso di **ok** riavviare nginx, perché acquisisca il nuovo endpoint. | ||
| + | |||
| + | <code bash> | ||
| + | root@homeassistant:/ | ||
| + | root@homeassistant:/ | ||
| + | ● nginx.service - A high performance web server and a reverse proxy server | ||
| + | | ||
| + | | ||
| + | | ||
| + | </ | ||
| + | Nel '' | ||
| + | Nel '' | ||