c++ - Installing a Test Application on Amazon EC2 -


i want use aws products build application on it. now, want test -

1) create webpage hosted @ aws simple text box , submit button, checking if number prime. 2) compile c++ program on ec2 accept number , reply if prime.

can list steps involved in doing this? (the above example mirrors simplistically actual application have in mind, http frontend , c++ backend)

if use default linux ami, gave standard apache installation ready go. sounds invocation style of app request-response, @ least begin with, use cgi apache run app.

to achieve this, this:

  1. create static html page form , submit button passes form data app via cgi
  2. install app appropriate directory (see apache config details) run via cgi, taking care ensure correct permissions set
  3. have app parse cgi environment variables gather input
  4. perform processing required
  5. generate resulting output http response (to started, use text/plain).

please note there many security issues keep in mind here, important perform strict validation on data supplied web user escaping issues, buffer overflows , on.

if aren't familiar above, need read on html forms, apache configuration , basic http headers @ at minimum. there plenty of examples out there, , great books covering topic.

to end, various libraries have been developed facilitate this:

there many other options interfacing app apache, such fastcgi.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -