I’m currently using an Apache server with PHP to listen for requests from another server. The server either loads a page with arguments (GET) or posts values to a page (POST) to trigger an event.
I’m wondering if I could make a Bash listener to listen for requests instead of having a whole Apache server to listen.
If this is possible, how would I do so? It would have to be able to execute other Bash scripts. My current method uses PHP’s exec function, which I don’t think is speed optimized.
From ‘man bash`:
Here is a web server that is distributed with Bash.
On my system, its
/usr/share/doc/bash/examples/scripts/websrv.sh