How Do You Configure Nginx to Listen to Messages Sent via HTTP?

Problem scenario
You have Nginx configured. The access logs never pick up any POST message content. You get 405 error messages. What do you do?

This will send a message payload -- but not via POST. It may not work for your situation. To get a message to be sent to a website (a listening web service), craft a URL that does not necessarily exist, but retain the domain name or IP address.

Run a command like this: curl http://x.x.x.x/SPECIALTESTTOAPPEAR
(But replace x.x.x.x with the domain name or the IP address of the website; replace the "SPECIALTESTTOAPPEAR" with the string of your choice.)

Go to the access.log file on the back-end of the Nginx server (e.g., run sudo find / -name access.log). You should see "SPECIALTESTTOAPPEAR" in the logs.

Leave a comment

Your email address will not be published. Required fields are marked *