Hallo Canon,
zu den Warnungen steht einiges in den Kopfbeiträgen 1.8 / 1.8.1 released.
Das Sperren eines Items machst Du am besten über eine & Verknüpfung mit der Freigabe Adresse.
Gruß Jürgen
Ankündigung
Einklappen
Keine Ankündigung bisher.
Amazon Alexa Plugin
Einklappen
X
-
Ich habe mir mal die Beschreibung der Funktionen angeschaut. Noch kann ich davon einiges ja implementieren - es wird ja immer mehr.
Nun habe ich gesehen, dass es einen LockController gibt. Das ist sicherlich eher für Türen gedacht. Ich würde gerne aber auch andere Dinge sperren, wie beispielsweise, sperre Licht im Wohnzimmer oder so ähnlich. Das Problem: Laut Anleitung ist beim Entsperren ein Pin erforderlich. Gibt es da irgendwie eine Alternative, wie man das realisieren könnte?
Und dann gibt es seit Version 1.81 ständig etliche Warnungen im Log - vor allem wegen Alexa. Kann man das irgendwie deaktivieren?
Code:WARNING lib.metadata Item 'EG.Essen.Rollladen.pos', attribute 'alexa_range_delta': Attribute is undefined and has value '20' (defined in Rollladen.yaml)
Einen Kommentar schreiben:
-
Hi @Gersch,
wie vermutet war das ein PHP-Problem, die genaue Ursache kann ich Dir im Moment auch nicht nennen.
Ich denke das ist am einfachsten raus zufinden wenn Du die funktionierende Step by Step auf die "alte" umbaust.
(Es wäre schön wenn Du uns an dieser Info teilhaben lässt)
Das Problem mit der Socketverbindung rührt aus den verwendeten Ports der smartvisu siehe auch hier. Ab Post #120
Das Problem ist aus meiner Sicht nicht final gelöst - Die Diskussion hatte begonnen ist aber wieder untergegangen.
Das Problem gibt es nur wenn man 2 Rechner hat - 1 x NGINX für den https-Teil und 1xshng+smartVISU
und
intern via http mit dem shng/smartvisu kommunizieren will und von
extern via nginx und https.
Da hilft die "Krücke" mit "leerem" Port nicht wirklich. Zum Testen solltest Du auf jeden Fall versuchen ob die smartVISU korrekt läuft wenn Du den Port
in der SmartVISU-Config leer lässt. Das sollte dann via https und nginx laufen allerdings nicht mehr via http direkt auf deinen shng/smartVISU-Rechner.
Auch hier : Lass uns an Deinen Erkenntnissen teil habe,
Viele Grüsse
Andre
Einen Kommentar schreiben:
-
Das verstehe ich jetzt nicht. Das Foto war als ich auf Vorschau geklickt habe aber da!?!?
smartvisu.JPG
Ich habe jetzt mal meine https.conf gekübelt und durch die, die auf https://www.smarthomeng.de/nginx-als-reverseproxy beschrieben ist ersetzt. Ergebnis:
smartvisu2.PNG
Somit wird zumindest mal die Seite Richtig angezeigt. Das Alexa-Plugin funktioniert, Nur die Verbindung zum smarhome.py scheinbar noch nicht.
Meine neue http.conf sieht so aus
Code:server { server_tokens off; ## Blocken, wenn Zugriff aus einem nicht erlaubten Land erfolgt ## if ($allowed_country = no) { return 403; } # https://www.cyberciti.biz/tips/linux-unix-bsd-nginx-webserver-security.html ## Block download agents ## if ($http_user_agent ~* LWP::Simple|BBBike|wget) { return 403; } ## Block some robots ## if ($http_user_agent ~* msnbot|scrapbot) { return 403; } ## Deny certain Referers ## if ( $http_referer ~* (babes|forsale|girl|jewelry|love|nudit|organic|pok er|porn|sex|teen) ) { return 403; } listen 443 ssl default_server; server_name glock.ddnss.de; ## # SSL ## ## Activate SSL, setze SERVER Zertifikat Informationen ## # Generiert via Let's Encrypt! ssl on; ssl_certificate /etc/letsencrypt/live/glock.ddnss.de/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/glock.ddnss.de/privkey.pem; ssl_session_cache builtin:1000 shared:SSL:10m; ssl_prefer_server_ciphers on; # unsichere SSL Ciphers deaktivieren! ssl_ciphers HIGH:!aNULL:!eNULL:!LOW:!3DES:!MD5:!RC4; ## # HSTS ## add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; ## # global ## root /var/www/; index index.php index.htm index.html; # Weiterleitung zu SmartHomeNG (Websocket Schnittstelle) mit Basic Auth # Nur Verbindungen gegen "/" durchlassen! Also weder auf Dateien noch Verzeichnisse (= nur Websocket Connects) location = / { auth_basic "Restricted Area: smartVISU"; auth_basic_user_file /etc/nginx/.smartvisu; proxy_pass http://192.168.178.10:2424; } # Zugriff auf die smartVISU mit Basic Auth location /smartVISU { auth_basic "Restricted Area: smartVISU"; auth_basic_user_file /etc/nginx/.smartvisu; proxy_pass http://192.168.178.10/smartVISU; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } # Alexa Plugin Weiterleitung location /alexa { auth_basic "Restricted Area: Alexa"; auth_basic_user_file /etc/nginx/.alexa; proxy_pass http://192.168.178.10:9000/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } # Network Plugin Weiterleitung #location /shng { #auth_basic "Restricted Area: SmartHomeNG"; #auth_basic_user_file /etc/nginx/.shng; #proxy_pass http://<SmartHomeNG LAN IP>:<Network Plugin Port>/; #proxy_set_header Host $host; #proxy_set_header X-Real-IP $remote_addr; #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; #proxy_set_header X-Forwarded-Proto $scheme; #} }
Einen Kommentar schreiben:
-
Hallo Gersch ,
vielleicht hab ich Tomaten auf den Augen ab ich kann Dein Foto nirgends sehen ? Hilf mir bitte die Tomaten abzunehmen.
Ich habe die Vermutung das es am durchreichen von php scheitert. Vom "Foto" erhoffe ich mir nähere Erkenntnisse.Zitat von Gersch Beitrag anzeigenNach dieser Eingabe erscheinen aber nur Textteile meiner smartvisu (Siehe Foto)
Viele Grüsse
Andre
Einen Kommentar schreiben:
-
Laufen denn die anderen Sachen alle? Wenn ja, vermute ich mal, dass du zum einen den Port brauchst, zumindest den, der irgendwo im apache server konfiguriert ist. ich würde auch bei den apache-settings schauen, ob da Port und Weiterleitung richtig eingestellt ist. Das macht wie gesagt genau dann Sinn, wenn alle anderen Sachen laufen, weil die SmartVisu apache braucht.
Einen Kommentar schreiben:
-
Ich steh entweder gerade total auf der Leitung, oder ich bin wirklich zu blöd dafür.
Lokal rufe ich die Seite mit 192.168.178.10/smartvisu auf. Ohne Portangabe.Zitat von Jürgen Beitrag anzeigenDazu muss er für die Unterseite /smartVISU ein Ziel haben, also ip und Port
Bei Cannon ist es die ip 1.30 mit port 8080.
Also die URL, die DU im lokalen Netz auch aufrufst.
Dies ist ja in meiner https.conf auch eingetragen.
Habe versucht, da mal :80 dranzuhängen, ergibt allerdings das Gleiche. Es wird nur das bereits gepostete gezeigt (Foto). Cache vom Browser wird natürlich immer gelöscht.Code:# Zugriff auf die smartVISU mit Basic Auth location /smartvisu { include /etc/nginx/headers.conf; satisfy any; auth_basic "Restricted Area: smartVISU2.9"; auth_basic_user_file /etc/nginx/.smartvisu; allow 127.0.0.1; allow 192.168.0.0/16; allow 10.0.0.0/16; allow ::1; deny all; access_by_lua_file /etc/nginx/scripts/hass_access.lua; [B][COLOR=#c0392b]proxy_pass http://192.168.178.10/smartvisu;[/COLOR][/B] proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; }
Wenn ich das ganze allow auskommentiere, damit es so aussieht wie bei Cannon, bringt es leider auch nicht´s.
Könnt ihr mir da bitte auf die Sprünge helfen.
Einen Kommentar schreiben:
-
Hii,
mach am besten mal ne Zeichnung :-)
Die externe URL www.deineseite.domain/smartVISU
wird vom Proxy zu deinem raspi geleitet.
Dazu muss er für die Unterseite /smartVISU ein Ziel haben, also ip und Port
Bei Cannon ist es die ip 1.30 mit port 8080.
Also die URL, die DU im lokalen Netz auch aufrufst.
Gruß Jürgen
Einen Kommentar schreiben:
-
Das sollte reichen. Meine conf sieht aber diesbezüglich anders aus:Zitat von Gersch Beitrag anzeigenWenn ich das richtig verstehe, wir ja mit Code:
include /etc/nginx/conf.d/*.conf;
meine obere Config inkludiert !? Dort ist ja Weiterleitung eingetragen
Code:# Zugriff auf die smartVISU mit Basic Auth location /smartVISU { auth_basic "Restricted Area: smartVISU"; auth_basic_user_file /etc/nginx/.smartvisu; proxy_pass http://192.168.1.30:8080/smartVISU; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; }
Einen Kommentar schreiben:
-
Hallo Jürgen
Danke für deine schnelle Antwort. Meine nginx.conf sieht so aus.
Wenn ich das richtig verstehe, wir ja mitCode:user www-data; worker_processes auto; pid /run/nginx.pid; include /etc/nginx/modules-enabled/*.conf; events { worker_connections 768; # multi_accept on; } http { log_format specialLog '[$time_local] $remote_addr forwarded for $http_x_real_ip - ' 'Request: "$request" - Status: $status - Bytes sent: $body_bytes_sent ' 'Referrer: "$http_referer" - User Agent: "$http_user_agent"'; ## # Basic Settings ## map $http_upgrade $connection_upgrade { default upgrade; '' close; } sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; include /etc/nginx/mime.types; default_type application/octet-stream; include /etc/nginx/proxy_params; include /etc/nginx/fastcgi_params; ## # SSL Settings ## ssl_protocols TLSv1.2; # Dropping SSLv3, ref: POODLE ssl_prefer_server_ciphers on; ## # Logging Settings ## access_log /var/log/nginx/access.log specialLog buffer=64K; error_log /var/log/nginx/error.log; ## # Gzip Settings ## gzip on; gzip_disable "msie6"; gunzip on; gzip_static on; gzip_comp_level 2; gzip_proxied any; gzip_types application/javascript application/json application/vnd.ms-fontobject application/x-font-ttf image/svg+xml text/css text/plain text/xml; gzip_vary on; gzip_buffers 16 8k; gzip_http_version 1.1; ## # GeoIP Settings # Nur Länder aus erlaubten IP Bereichen dürfen den ReverseProxy # passieren! # https://www.howtoforge.de/anleitung/nginx-besucher-mit-dem-geoip-modul-nach-landern-blocken-debianubuntu/ ## geoip_country /usr/share/GeoIP/GeoIP.dat; map $geoip_country_code $allowed_country { default yes; BY no; BR no; KP no; KR no; RS no; RO no; RU no; CN no; CD no; NE no; GH no; IQ no; IR no; SY no; UA no; HK no; JP no; SC no; } ## # Virtual Host Configs ## include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; ## # Harden nginx against DDOS ## client_header_timeout 10; client_body_timeout 10; }
meine obere Config inkludiert !? Dort ist ja Weiterleitung eingetragenCode:include /etc/nginx/conf.d/*.conf;
Muss ich das dann in der /etc/nginx/nginx.conf nochmal eintragen?Code:# Weiterleitung zu SmartHomeNG (Websocket Schnittstelle) mit Basic Auth location = / { include /etc/nginx/headers.conf; satisfy any; auth_basic "Restricted Area"; auth_basic_user_file /etc/nginx/.smartvisu; allow 127.0.0.1; allow 192.168.0.0/16; allow 10.0.0.0/16; allow ::1; deny all; # This script tests the SSL certificate and enables Websocket access with Apple devices. # If you want to limit your access to devices with certificates (recommended!), don't remove this line! access_by_lua_file /etc/nginx/scripts/hass_access.lua; # Nur Websocket Verbindungen gegen "/" durchlassen! if ($http_upgrade = websocket) { proxy_pass http://192.168.178.10:2424; } }
LG GerschZuletzt geändert von Gersch; 12.01.2021, 10:16.
Einen Kommentar schreiben:
-
Moin..
Ich vermute mal, Dein Proxy hat keine Weiterleitung..
Schau mal in die /etc/nginx/nginx.conf
####START PLUGINS
####SMARTVISU ANFANG
#location = / {
# auth_basic "Restricted Area: smartVISU";
# auth_basic_user_file /etc/nginx/.smartvisu;
# proxy_pass http://<ip>:2424;
# }
####SMARTVISU ENDE
Da musst Du Port und Ziel für Deine Visu eingeben, damit die externen Anfragen auch zum richtigen Ziel gehen.
Gruß Jürgen
Einen Kommentar schreiben:
-
Liebe Forenmitglieder
Ich glaube zwar fast, dass das hier der falsche Thread für meine Frage ist, aber da es schon ein paar mal angeschnitten wurde, versuche ich mein Glück.
Ich habe alles nach Anleitung von schuma und 2malmama eingerichtet und das Alexa-plugin funktioniert einwandfrei. Ich wollte nun auch meine Vpn-Verbindung deaktivieren, um von außen auf meine Smartvisu zugreifen zu können, Hier habe ich aber folgendes Problem.
Ich gebe extern im Browser https://<meineDomain>/smartvisu ein und ich werde aufgefordert einen Benutzernamen und ein Passwort einzugeben. Nach dieser Eingabe erscheinen aber nur Textteile meiner smartvisu (Siehe Foto)
Zum System:
Raspberry mit der ip 192.168.178.10 ist der Pi, auf dem Smarthome und die Visu läuft.
Raspi2 mit der IP 192.168.178.11 auf dem der nginx reverse Proxy läuft.
Auf beiden Systemen läuft das Image von OnkelAndy. Auf dem Raspi2 wurde der Reverse-Proxy via setup_all erstellt, was ja auch fuinktionieren dürfte, weil das Alexa-Plugin ja funktioniert.
Gebe ich intern 192.168.178.11/smartvisu in den Browser ein, erhalte ich dieselbe Ausgabe wie im Bild oben.
Mit 192.168.178.10/smartvisu funktioniert alles. Ich gehe daher davon aus, das das Problem am Raspi2 liegt, auf dem der reverse-proxy läuft.
Im access.log vom ngnix erscheinen etliche Einträge wie z.B:
Der Ordner smartvisu gehört dem Benutzer smarhome und zur Gruppe www-data und die Dateien haben alle die Rechte 755 warum wird das dann nicht angezeigt?Code:[12/Jan/2021:06:45:57 +0100] 5.11.0.100 forwarded for - - Request: "GET /smartvisu/pages/Glock/visu.js HTTP/2.0" - Status: 403 - Bytes sent: 181 Referrer: "https://glock.ddnss.de/smartvisu/index.php?" -$ [12/Jan/2021:06:45:57 +0100] 5.11.0.100 forwarded for - - Request: "GET /smartvisu/icons/ws/temp_outside.svg HTTP/2.0" - Status: 403 - Bytes sent: 181 Referrer: "https://glock.ddnss.de/smartvisu/index.php$ [12/Jan/2021:06:45:57 +0100] 5.11.0.100 forwarded for - - Request: "GET /smartvisu/widgets/animation.js HTTP/2.0" - Status: 403 - Bytes sent: 181 Referrer: "https://glock.ddnss.de/smartvisu/index.php?" - $ [12/Jan/2021:06:45:57 +0100] 5.11.0.100 forwarded for - - Request: "GET /smartvisu/icons/ws/edit_numeric_0.svg HTTP/2.0" - Status: 403 - Bytes sent: 181 Referrer: "https://glock.ddnss.de/smartvisu/index.p$ [12/Jan/2021:06:45:57 +0100] 5.11.0.100 forwarded for - - Request: "GET /smartvisu/icons/ws/edit_numeric_1.svg HTTP/2.0" - Status: 403 - Bytes sent: 181 Referrer: "https://glock.ddnss.de/smartvisu/index.p$ [12/Jan/2021:06:45:57 +0100] 5.11.0.100 forwarded for - - Request: "GET /smartvisu/widgets/basic.js HTTP/2.0" - Status: 403 - Bytes sent: 181 Referrer: "https://glock.ddnss.de/smartvisu/index.php?" - User$
Meine https.conf sieh so aus
Code:Könnte mir da bitte jemand weiterhelfen?Code:server { set $nw_port 8888; set $backend_port 8383; set $red_port 1880; server_tokens off; ## Blocken, wenn Zugriff aus einem nicht erlaubten Land erfolgt ## if ($allowed_country = no) { return 403; } # https://www.cyberciti.biz/tips/linux-unix-bsd-nginx-webserver-security.html ## Block download agents ## if ($http_user_agent ~* LWP::Simple|BBBike|wget) { return 403; } ## Block some robots ## if ($http_user_agent ~* msnbot|scrapbot) { return 403; } ## Deny certain Referers ## if ( $http_referer ~* (babes|forsale|girl|jewelry|love|nudit|organic|pok er|porn|sex|teen) ) { return 403; } listen 443 ssl http2; listen [::]:443 ssl http2; server_name glock.ddnss.de; ## # SSL ## ## Activate SSL, setze SERVER Zertifikat Informationen ## # Generiert via Let's Encrypt! ssl_certificate /etc/letsencrypt/live/glock.ddnss.de/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/glock.ddnss.de/privkey.pem; ssl_trusted_certificate /etc/letsencrypt/live/glock.ddnss.de/fullchain.pem; ssl_session_cache builtin:1000 shared:SSL:60m; ssl_prefer_server_ciphers on; # unsichere SSL Ciphers deaktivieren! ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:D[IMG2=JSON]{"data-align":"none","data-size":"full","src":"https:\/\/knx-user-forum.de\/core\/image\/gif;base64,R0lGODlhAQABAPABAP\/\/\/wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw=="}[/IMG2]HE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:D[IMG2=JSON]{"data-align":"none","data-size":"full","src":"https:\/\/knx-user-forum.de\/core\/image\/gif;base64,R0lGODlhAQABAPABAP\/\/\/wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw=="}[/IMG2]HE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384; ssl_ecdh_curve secp384r1; ssl_protocols TLSv1.2; ssl_session_timeout 60m; ssl_session_tickets on; ssl_session_ticket_key /etc/nginx/nginx_ticketkey; #ssl_buffer_size 16k; #for throughput, video applications ssl_buffer_size 4k; #for quick first byte delivery # Client Zertifikat spezifisch ssl_client_certificate /etc/ssl/ca/certs/ca.crt; ssl_crl /etc/ssl/ca/private/ca.crl; ssl_verify_client optional; ssl_dhparam /etc/ssl/ca/dh.pem; # OCSP Stapling --- # fetch OCSP records from URL in ssl_certificate and cache them ssl_stapling on; ssl_stapling_verify on; resolver 8.8.8.8 8.8.4.4 valid=300s; resolver_timeout 5s; client_body_buffer_size 8K; client_max_body_size 20m; client_body_timeout 10s; client_header_buffer_size 1k; large_client_header_buffers 2 16k; client_header_timeout 5s; ## # global ## root /var/www/html; # Add index.php to the list if you are using PHP index index.html index.htm index.php; # Proxy Caching # Skip^1 caching variable init set $nocache 0; # Bypass^2 caching variable init set $purgecache 0; # Bypass^2 cache on no-cache (et al.) browser request if ($http_cache_control ~ "max-age=0") { set $purgecache 1; } if ($http_cache_control ~ "no-cache") { set $purgecache 1; } # Bypass^2 cache with custom header set on request if ($http_x_cache_purge ~* "true") { set $purgecache 1; } location ~* favicon|apple-touch-icon|android-chrome-|mstile-|safari-pinned-tab.svg|browserconfig.xml|manifest.json|apple-icon|ms-icon|android-icon|mstile { try_files $uri @favicons; } location @favicons { rewrite ^/(.+)$ /favicons/$1 last; } location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|xml)$ { include /etc/nginx/headers.conf; expires 7d; add_header Cache-Control "public, no-transform"; # This script tests the SSL certificate and enables Websocket access with Apple devices. # If you want to limit your access to devices with certificates (recommended!), don't remove this line! access_by_lua_file /etc/nginx/scripts/hass_access.lua; } # Weiterleitung zu SmartHomeNG (Websocket Schnittstelle) mit Basic Auth location = / { include /etc/nginx/headers.conf; satisfy any; auth_basic "Restricted Area"; auth_basic_user_file /etc/nginx/.smartvisu; allow 127.0.0.1; allow 192.168.0.0/16; allow 10.0.0.0/16; allow ::1; deny all; # This script tests the SSL certificate and enables Websocket access with Apple devices. # If you want to limit your access to devices with certificates (recommended!), don't remove this line! access_by_lua_file /etc/nginx/scripts/hass_access.lua; # Nur Websocket Verbindungen gegen "/" durchlassen! if ($http_upgrade = websocket) { proxy_pass http://192.168.178.10:2424; } } # Zugriff auf die smartVISU mit Basic Auth location /smartvisu { include /etc/nginx/headers.conf; satisfy any; auth_basic "Restricted Area: smartVISU2.9"; auth_basic_user_file /etc/nginx/.smartvisu; allow 127.0.0.1; allow 192.168.0.0/16; allow 10.0.0.0/16; allow ::1; deny all; # This script tests the SSL certificate and enables Websocket access with Apple devices. # If you want to limit your access to devices with certificates (recommended!), don't remove this line! access_by_lua_file /etc/nginx/scripts/hass_access.lua; #This is alternative to the lua script but doesn't work with Apple devices. #if ($ssl_client_verify != SUCCESS) { # return 403; #} # proxy_pass http://sv/smartvisu; proxy_pass http://192.168.178.10/smartvisu; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } # Zugriff auf die smartVISU 2.8 mit Basic Auth location /smartvisu2.8 { include /etc/nginx/headers.conf; satisfy any; auth_basic "Restricted Area: smartVISU2.8"; auth_basic_user_file /etc/nginx/.smartvisu; allow 127.0.0.1; allow 192.168.0.0/16; allow 10.0.0.0/16; allow ::1; deny all; # This script tests the SSL certificate and enables Websocket access with Apple devices. # If you want to limit your access to devices with certificates (recommended!), don't remove this line! access_by_lua_file /etc/nginx/scripts/hass_access.lua; proxy_pass http://sv/smartvisu2.8; } # Zugriff auf nodered location /red/ { include /etc/nginx/headers.conf; satisfy any; auth_basic "Restricted Area: smartVISU2.9"; auth_basic_user_file /etc/nginx/.smartvisu; allow 127.0.0.1; allow 192.168.0.0/16; allow 10.0.0.0/16; allow ::1; deny all; # This script tests the SSL certificate and enables Websocket access with Apple devices. # If you want to limit your access to devices with certificates (recommended!), don't remove this line! access_by_lua_file /etc/nginx/scripts/hass_access.lua; proxy_pass http://$server_addr:$red_port; location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ { include /etc/nginx/headers.conf; expires 7d; add_header Cache-Control "public, no-transform"; proxy_pass http://$server_addr:$red_port; access_by_lua_file /etc/nginx/scripts/hass_access.lua; } } # Alexa Plugin Weiterleitung location /alexa/ { include /etc/nginx/headers.conf; satisfy any; auth_basic "Restricted Area: Alexa"; auth_basic_user_file /etc/nginx/.alexa; allow 127.0.0.1; allow 192.168.0.0/16; allow 10.0.0.0/16; allow ::1; deny all; # This script tests the SSL certificate and enables Websocket access with Apple devices. # If you want to limit your access to devices with certificates (recommended!), don't remove this line! access_by_lua_file /etc/nginx/scripts/hass_access.lua; # proxy_pass http://alexa; proxy_pass http://192.168.178.10:9000/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } # Backend Plugin Weiterleitung location /gstatic/ { include /etc/nginx/headers.conf; satisfy any; auth_basic "Restricted Area: Smarthome NG Backend"; auth_basic_user_file /etc/nginx/.shng; proxy_set_header Authorization "Basic c21hcnRob21lCg=="; # Create your base64 Passwort on the commandline: openssl enc -base64 <<< '<PASSWORD>' allow 127.0.0.1; allow 192.168.0.0/16; allow 10.0.0.0/16; allow ::1; deny all; # This script tests the SSL certificate and enables Websocket access with Apple devices. # If you want to limit your access to devices with certificates (recommended!), don't remove this line! access_by_lua_file /etc/nginx/scripts/hass_access.lua; location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ { include /etc/nginx/headers.conf; expires 7d; add_header Cache-Control "public, no-transform"; proxy_pass http://$server_addr:$backend_port; access_by_lua_file /etc/nginx/scripts/hass_access.lua; } proxy_pass http://$server_addr:$backend_port; } location /visu_websocket/ { include /etc/nginx/headers.conf; satisfy any; auth_basic "Restricted Area: Smarthome NG Backend"; auth_basic_user_file /etc/nginx/.shng; proxy_set_header Authorization "Basic c21hcnRob21lCg=="; # Create your base64 Passwort on the commandline: openssl enc -base64 <<< '<PASSWORD>' allow 127.0.0.1; allow 192.168.0.0/16; allow 10.0.0.0/16; allow ::1; deny all; # This script tests the SSL certificate and enables Websocket access with Apple devices. # If you want to limit your access to devices with certificates (recommended!), don't remove this line! access_by_lua_file /etc/nginx/scripts/hass_access.lua; location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ { include /etc/nginx/headers.conf; expires 7d; add_header Cache-Control "public, no-transform"; proxy_pass http://$server_addr:$backend_port; access_by_lua_file /etc/nginx/scripts/hass_access.lua; } proxy_pass http://$server_addr:$backend_port; } location /api/ { include /etc/nginx/headers.conf; satisfy any; auth_basic "Restricted Area: Smarthome NG Backend"; auth_basic_user_file /etc/nginx/.shng; proxy_set_header Authorization "Basic c21hcnRob21lCg=="; # Create your base64 Passwort on the commandline: openssl enc -base64 <<< '<PASSWORD>' allow 127.0.0.1; allow 192.168.0.0/16; allow 10.0.0.0/16; allow ::1; deny all; # This script tests the SSL certificate and enables Websocket access with Apple devices. # If you want to limit your access to devices with certificates (recommended!), don't remove this line! access_by_lua_file /etc/nginx/scripts/hass_access.lua; location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ { include /etc/nginx/headers.conf; expires 7d; add_header Cache-Control "public, no-transform"; proxy_pass http://$server_addr:$backend_port; access_by_lua_file /etc/nginx/scripts/hass_access.lua; } proxy_pass http://$server_addr:$backend_port; } location /admin/ { include /etc/nginx/headers.conf; satisfy any; auth_basic "Restricted Area: Smarthome NG Backend"; auth_basic_user_file /etc/nginx/.shng; proxy_set_header Authorization "Basic c21hcnRob21lCg=="; # Create your base64 Passwort on the commandline: openssl enc -base64 <<< '<PASSWORD>' allow 127.0.0.1; allow 192.168.0.0/16; allow 10.0.0.0/16; allow ::1; deny all; # This script tests the SSL certificate and enables Websocket access with Apple devices. # If you want to limit your access to devices with certificates (recommended!), don't remove this line! access_by_lua_file /etc/nginx/scripts/hass_access.lua; location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ { include /etc/nginx/headers.conf; expires 7d; add_header Cache-Control "public, no-transform"; proxy_pass http://$server_addr:$backend_port; access_by_lua_file /etc/nginx/scripts/hass_access.lua; } proxy_pass http://$server_addr:$backend_port; } location /backend/ { include /etc/nginx/headers.conf; satisfy any; auth_basic "Restricted Area: Smarthome NG Backend"; auth_basic_user_file /etc/nginx/.shng; proxy_set_header Authorization "Basic c21hcnRob21lCg=="; # Create your base64 Passwort on the commandline: openssl enc -base64 <<< '<PASSWORD>' allow 127.0.0.1; allow 192.168.0.0/16; allow 10.0.0.0/16; allow ::1; deny all; # This script tests the SSL certificate and enables Websocket access with Apple devices. # If you want to limit your access to devices with certificates (recommended!), don't remove this line! access_by_lua_file /etc/nginx/scripts/hass_access.lua; location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ { include /etc/nginx/headers.conf; expires 7d; add_header Cache-Control "public, no-transform"; proxy_pass http://$server_addr:$backend_port; access_by_lua_file /etc/nginx/scripts/hass_access.lua; } proxy_pass http://$server_addr:$backend_port; } # Network Plugin Weiterleitung location /shnet/ { include /etc/nginx/headers.conf; satisfy any; # auth_basic "Restricted Area: Smarthome NG Network"; # auth_basic_user_file /etc/nginx/.shng; proxy_set_header Authorization "Basic c21hcnRob21lCg=="; # Create your base64 Passwort on the commandline: openssl enc -base64 <<< '<PASSWORD>' allow 127.0.0.1; allow 192.168.0.0/16; allow 10.0.0.0/16; allow ::1; deny all; # This script tests the SSL certificate and enables Websocket access with Apple devices. # If you want to limit your access to devices with certificates (recommended!), don't remove this line! access_by_lua_file /etc/nginx/scripts/hass_access.lua; rewrite ^/shnet/(.*) /$1 break; proxy_pass http://$server_addr:$nw_port; } # Weiterleitung zu Grafana location /grafana/ { satisfy any; allow 127.0.0.1; allow 10.0.0.0/8; allow 192.168.0.0/16; # auth_basic "Restricted Area: Monit"; # auth_basic_user_file /etc/nginx/.monit; allow ::1; deny all; # This script tests the SSL certificate and enables Websocket access with Apple devices. # If you want to limit your access to devices with certificates (recommended!), don't remove this line! access_by_lua_file /etc/nginx/scripts/hass_access.lua; proxy_pass http://grafanahost/; include /etc/nginx/headers.conf; location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ { rewrite ^/grafana/(.*) /$1 break; include /etc/nginx/headers.conf; expires 7d; add_header Cache-Control "public, no-transform"; proxy_pass http://grafanahost; access_by_lua_file /etc/nginx/scripts/hass_access.lua; } }
Einen Kommentar schreiben:
-
das geht mir hier auch so - das tut wirklich gut! (kommt man sich dann doch nur halb so doof vor)Zitat von Medicusi Beitrag anzeigenDanke das ihr mir immer wieder das Gefühl gebt ruhig eine ehrliche Frage stellen zu können.
Hi Medi,
ich überlege gerade, an welcher Stelle Du gerade klemmst....
Aber bezüglich Deinem Bild habe ich in meinen Aufzeichnungen stehen, dass "ohne Vorgabe " richtig ist und Du bei der Laufzeit-Info nichts ändern musst.
Einen Kommentar schreiben:
-
Hier meine letzte Version der Anleitung. Die Qualität ist leider immer noch nicht besser, da in das Forum hier nur 1MB hochgeladen werden kann.
Alexa V3 Plugin.zip
Grüße, Marc
Einen Kommentar schreiben:
-
Einen Kommentar schreiben:


Einen Kommentar schreiben: