Wenn dies dein erster Besuch hier ist, lies bitte zuerst die Hilfe - Häufig gestellte Fragen durch. Du musst dich vermutlich registrieren, bevor du Beiträge verfassen kannst. Klicke oben auf 'Registrieren', um den Registrierungsprozess zu starten. Du kannst auch jetzt schon Beiträge lesen. Suche dir einfach das Forum aus, das dich am meisten interessiert.
[smarthome@SmartHomeNG ~]$ sudo dpkg -l | grep php
ii libapache2-mod-php7.0 7.0.19-1 armhf server-side, HTML-embedded scripting language (Apache 2 module)
ii libawl-php 0.57-1 all Andrew's Web Libraries - PHP Utility Libraries
ii php-common 1:49 all Common files for PHP packages
ii php-curl 1:7.0+49 all CURL module for PHP [default]
ii php-mbstring 1:7.0+49 all MBSTRING module for PHP [default]
ii php7.0 7.0.19-1 all server-side, HTML-embedded scripting language (metapackage)
ii php7.0-cli 7.0.19-1 armhf command-line interpreter for the PHP scripting language
ii php7.0-common 7.0.19-1 armhf documentation, examples and common module for PHP
ii php7.0-curl 7.0.19-1 armhf CURL module for PHP
ii php7.0-json 7.0.19-1 armhf JSON module for PHP
ii php7.0-mbstring 7.0.19-1 armhf MBSTRING module for PHP
ii php7.0-opcache 7.0.19-1 armhf Zend OpCache module for PHP
ii php7.0-readline 7.0.19-1 armhf readline module for PHP
ii php7.0-xml 7.0.19-1 armhf DOM, SimpleXML, WDDX, XML, and XSL module for PHP
Also ich kann mich auch täuschen aber ich sehe mal als erstes, dass bei dir kein Port 443 läuft und somit keine verbindung per https möglich ist. Außerdem hast du kein php-fpm installiert. Das habe ich aber glaube ich aus einem anderen Grund gemacht.
Also solltest du mal die NGINX Logs darauf prüfen warum der Port 443 nicht gebunden wird. Hast du das in der aktuellen Config noch auskommentiert?
[smarthome@SmartHomeNG ~]$ sudo dpkg -l | grep php
ii libapache2-mod-php7.0 7.0.19-1 armhf server-side, HTML-embedded scripting language (Apache 2 module)
ii libawl-php 0.57-1 all Andrew's Web Libraries - PHP Utility Libraries
ii php-common 1:49 all Common files for PHP packages
ii php-curl 1:7.0+49 all CURL module for PHP [default]
ii php-mbstring 1:7.0+49 all MBSTRING module for PHP [default]
ii php7.0 7.0.19-1 all server-side, HTML-embedded scripting language (metapackage)
ii php7.0-cli 7.0.19-1 armhf command-line interpreter for the PHP scripting language
ii php7.0-common 7.0.19-1 armhf documentation, examples and common module for PHP
ii php7.0-curl 7.0.19-1 armhf CURL module for PHP
ii php7.0-json 7.0.19-1 armhf JSON module for PHP
ii php7.0-mbstring 7.0.19-1 armhf MBSTRING module for PHP
ii php7.0-opcache 7.0.19-1 armhf Zend OpCache module for PHP
ii php7.0-readline 7.0.19-1 armhf readline module for PHP
ii php7.0-xml 7.0.19-1 armhf DOM, SimpleXML, WDDX, XML, and XSL module for PHP
Beim Aufruf von xyz.spdns.eu kommt eine Authentifizierung.
Nach Eingabe der Daten aus htpasswd kommt wieder eine Authentifizierung.
Nach Eingabe der Daten aus htpasswd.alexa kommt "Error response. Error Code 501"
Das passiert mit dieser config
Code:
# SSL-Redirect & LetsEncrypt Endpoint
server {
listen 80 default_server;
# redirect every requested $host (any, even invalid ones) to its SSL URL
location / {
return 301 https://$host$request_uri;
}
# LetsEncrypt Endpoint
location /.well-known {
alias /var/www/html/.well-known;
}
}
# Sitemap
server {
listen 443 ssl default_server;
access_log /var/log/nginx/sitemap.log combined;
auth_basic "smartvisu36.spdns.eu";
auth_basic_user_file /etc/nginx/htpasswd;
include /etc/nginx/include.d/common;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
location / {
root /var/www/html/sitemap;
index index.html;
}
}
# Alexa
server {
listen 443 ssl;
server_name smartvisu36.spdns.eu;
access_log /var/log/nginx/alexa.log combined;
auth_basic "Alexa";
auth_basic_user_file /etc/nginx/htpasswd.alexa;
include /etc/nginx/include.d/common;
location / {
proxy_pass http://192.168.1.13: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;
}
}
PERFEKT! Das 501 willst du sehen. Das kommt weil du keine JSON Anfrage liefern kannst. Das tut aber deine Alexa, wenn du ihr was sagst. Suche mal in deiner Alexa App jetzt nach Devices.
Ok, in der AWS Lambda weiß ich aber nicht so recht, welche Pfade wo hin gehören.
Code:
/*
You need to specify the following environmental variables in the lambda function:
- SMARTHOME_HOST
http://xyz.spdns.eu
- SMARTHOME_PORT
443 - endpoint must be https enabled!
- SMARTHOME_PATH
'/usr/local/'
- SMARTHOME_AUTH
'user:password'
*/
Und sollte der Discovery in der App dann nicht gehen versuche mal den kompletten Abschnitt #Sitemap in der Config des nginx auszukommentieren, nicht aber den #Alexa abschnitt und nicht vergessen nginx neustarten danach.
Okay. Hast du den Sitemap Part schon auskommentiert und den nginx neugestartet und dann das discovery nochmals versucht?
Was mich im AWS Log wundert ist, dass er der meinung ist bei 127.0.0.1 zu fragen. Das scheint seltsam.
Wir verarbeiten personenbezogene Daten über die Nutzer unserer Website mithilfe von Cookies und anderen Technologien, um unsere Dienste bereitzustellen. Weitere Informationen findest Du in unserer Datenschutzerklärung.
Indem Du unten auf "ICH stimme zu" klickst, stimmst Du unserer Datenschutzerklärung und unseren persönlichen Datenverarbeitungs- und Cookie-Praktiken zu, wie darin beschrieben. Du erkennst außerdem an, dass dieses Forum möglicherweise außerhalb Deines Landes gehostet wird und bist damit einverstanden, dass Deine Daten in dem Land, in dem dieses Forum gehostet wird, gesammelt, gespeichert und verarbeitet werden.
Kommentar