|No such thing as a small change|
Simple command line web server for running cgis.by EvdB (Deacon)
|on Aug 23, 2004 at 17:20 UTC||Need Help??|
EvdB has asked for the
wisdom of the Perl Monks concerning the following question:
Sometimes I want to fire up a websever for a particular directory just to test some scripts. It is a real pain to set up apache for this as it involves editing the httpd.conf file or moving the test files to another directory.
I have searched for some small webservers that can do CGI and can be started with just a command line. I have found a partial answer in mini_httpd. Running something like mini_httpd -p 8080 -c '**.pl' will start a server which uses the current directory as its base, it will listen on port 8080 and will treat anything ending in .pl as a CGI script.
Unfortunately there does not appear to be sensible error logging so a special line is required at the top of each script:
Does anyone have a solution to this problem. I want to start a server from the command line that lets me test scripts. Obviously this server will be very simple, only just enough for CGI scripts.
This is the list of servers I scanned to find mini_httpd.
--tidiness is the memory loss of environmental mnemonics