neloe / ngx_zmq

An upstream ZeroMQ module for nginx
BSD 2-Clause "Simplified" License
22 stars 4 forks source link

Error 404 #7

Closed vatnoise closed 8 years ago

vatnoise commented 8 years ago

Hi, trying to make it work but doesn't seem that anything is happening. :/

Added to a specific domain config:

location /zmq {
    zmq;
    zmq_endpoint "tcp://localhost:5555"; #endpoint is required
    zmq_socktype PUSH;
}

Also added to the general localhost:

location /zmq/ {
    zmq_endpoint "tcp://localhost:5555";
    zmq_socktype PUSH;
}

^ not sure if zmq; is needed because it's only mentioned in one place in the README

I tried doing curl -X POST -d "data=hi" http://my.domain.name/zmq and curl -X POST -d "data=hi" http://localhost/zmq, both of them return 404 not found and the my.domain.name one also mentions <p>The requested URL /zmq was not found on this server.</p>.

Found this in the log error.log 2016/08/12 10:59:45 [error] 3953#0: *1 open() "/usr/local/nginx/html/zmq" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "POST /zmq HTTP/1.1", host: "localhost"

Not really sure how can I debug it further?

vatnoise commented 8 years ago

Ah well, of course, I should have sent the request to .../zmq/ instead of .../zmq. -_-