Welcome! Log In Create A New Profile

Advanced

nginx ifttt maker

Posted by noesberger 
nginx ifttt maker
December 22, 2016 05:20PM
Hi

I'm running node-red on a server at home. On an other server I'm running nginx. I'm trying to setup nginx as a reverse proxy and use ifttt maker to access an API provided by the node-red server. When I'm using postman or an other client, I can access the url without any problem:
178.197.233.28 - - [22/Dec/2016:23:10:40 +0100] "PUT /ifttt/ HTTP/1.1" 200 0 "-" "HTTPea/1.1.1 CFNetwork/808.2.16 Darwin/16.3.0" "-"

But when I try to access it over ifttt I'm getting always an error and I can see the following error in the log:
54.164.82.62 - - [22/Dec/2016:23:10:16 +0100] "PUT /ifttt/ HTTP/1.1" 400 951 "-" "-" "-"

The config for ifttt in nginx is very simple, in the /etc/nginx/conf.d folder I have a file with the following config:
server {
listen 80;
server_name ifttt.noesberger.li;

location /ifttt/ {
proxy_pass http://192.168.1.214:1880/ifttt;
}
}

Can you please help me to find the issue?
Re: nginx ifttt maker
December 22, 2016 05:50PM
noesberger Wrote:
-------------------------------------------------------
> location /ifttt/ {
> proxy_pass http://192.168.1.214:1880/ifttt;
> }

location /ifttt/ {
proxy_pass http://192.168.1.214:1880;
}

---
nginx for Windows http://nginx-win.ecsds.eu/
Re: nginx ifttt maker
December 22, 2016 06:04PM
the same error in the access log:
54.164.82.62 - - [23/Dec/2016:00:01:30 +0100] "PUT /ifttt/ HTTP/1.1" 400 951 "-" "-" "-"

the /ifttt at the end of proxy_pass http://192.168.1.214:1880 I need. Because node-red is listening on :1880/ifttt
Re: nginx ifttt maker
December 23, 2016 10:25AM
Hi

I was able to find the error, it was an incorrect payload send by ifttt: SyntaxError: Unexpected token ' in JSON at position 2. So nginx was forwarding all correctly. Special thanks to Will for helping me finding the problem. (https://www.wlaurance.com/)
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 308
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready