I was using VPS with Apache/Nginx (at different times) on Ubuntu 14.04 and was executing commands/programs in php via exec(). Now I know that, I don't need Php for executing these things , let's say :
exec('whoami'); or
exec('myexec');
as php is just acting as additional layer in my case. So can I just use apache/nginx to get data from http requests made to it ( get,post..) and 'pass' as parameters to certain executable program and 'return the output'(plain text) ? Lets say a calc program that receives 3 param ( 4,5,+ ) and return output ( 9 ).
I have already seen this ques , but it states the procedure with Lua script , while I'm trying to do some hobby projects with c++. Currently I have no idea how to proceed as I'm only familiar with php LAMP stack , if I'm wrong somewhere a little guidance would be helpful :)