Not Just Paranoid

Another site by Pete Maynard

Check Apache2 CGI is working

Using bash, create the file, and write a simple CGI script which outputs, “It works!”.

echo -e '#!/usr/bin/perl\nprint "Content-type: text/plain\\n\\n";\nprint "It works!\\n";'|sudo tee /usr/lib/cgi-bin/

Give the new file correct permissions sudo chmod 755 /usr/lib/cgi-bin/

Send a get request to the script, by piping the request to the netcat.

echo -e "GET /cgi-bin/ HTTP/1.0\n"|nc -q 1 80```

15 Apr 2012 | Tags ( Apache2 CGI )

Website Last Updated on 15 Sep 2023 (CC BY-SA 4.0)

This site uses JQuery and nanogallery2 hosted by
for the Flickr photo feed and GoatCounter for user insights.