How can I run my perl CGI script without apache?

How can I run my perl CGI script without apache? This is for testing purposes, so for me one server of uniprocessor processes should be enough, which processes only one request.

+5
source share
4 answers

Script shoud will be launched as a specific user, and currently I do not want to configure suexecduring testing apache.

Nothing prevents you from duplicating the required Apache configuration, except for the user under whom it will be launched httpd, the interface / port for binding to and, possibly, the directory cgi-binand launching a separate copy httpd(with the option -f). This would be the safest way to test the application in the environment you intend to run.

See Starting Apache :

you can specify its location at run time using the command line option -f, as in

/usr/local/apache2/bin/apachectl -f /usr/local/apache2/conf/httpd.conf
+1
source

Plack::App::WrapCGI Plack::App::CGIBin ( plackup Plack HTTP), CGI , ( ), ( modperl, ). - , CGI CGI ( Perl, CGI , lighttpd ).

, CGI.pm, , , , - , .

( , ) , HTTP-, FastCGI, mod_perl CGI, push , CGI.pm

+5

, CGI.pm, , CGI.pm CGI . . http://perldoc.perl.org/CGI.html#DEBUGGING. CGI.pm . , CGI , -

 QUERY_STRING = blah=x&fu=bar

GET

 CONTENT_LENGTH = length of your file

POST.

+3

, , apache. , .

0

All Articles