How can I run my perl CGI script without apache? This is for testing purposes, so some kind of single-process server that processes only one request at time should be enough for me.
|
There is nothing preventing you from duplicating the requisite Apache configuration except for the user under which See Starting Apache:
|
|||
|
Plack::App::WrapCGI or Plack::App::CGIBin represent one way to do this (together with The reason why "are you using CGI.pm" is a relevant question is because if you haven't already started the application you might want to consider writing against pretty much anything else, e.g. (in random order to hide my obvious favoritism) and gain the ability to easily run the same app as a standalone HTTP server, FastCGI, mod_perl app, or plain CGI if push comes to shove, and without the impedance mismatch that you get when writing to CGI.pm's interface |
|||||
|
Since you mentioned in the comments that you're using CGI.pm, note that CGI.pm offers a range of options for running CGI scripts from the command line. See http://perldoc.perl.org/CGI.html#DEBUGGING. Even without CGI.pm, you could always just fake up the necessary environment variables and pipe in your file. Basically all you need to do to run a CGI from the command line is to set up
for GET methods, or
for POST methods. |
|||||||||||||
|
Get yourself a virtual machine and do whatever you like with it, including running apache. Duplicate as much as your target setup as you can. |
|||
|