Set up uhttpd for dynamic pages

Good day,

I am trying to build an HTML page to send data to the gateway using POST method.
uhttpd is pre-installed and is already working for static HTML pages. But I don’t achieve to set up uhttpd for dynamic pages, ie for running a script that interprets the HTTP requests and retrieves the data sent by POST method.

How do I link a custom HTTP request interpreter script with uhttpd?

This script seems to be called CGI.
There is an option:

option cgi_prefix ‘/cgi-bin’

I supposed I had to put my script in www/cgi-bin folder. But it is not called/not running.

Thank you for your help!

You can just create a LUA CGI script in for example /www/cgi-bin/example.lua and execute it with http://192.168.1.1/cgi-bin/example.lua. You should probably start by reading this or other simillar resources about CGI scripts.

This topic was automatically closed after 15 days. New replies are no longer allowed.