Thanks for all the input. I fixed the typo on #!, renamed the file name, created cgi-bin dir under the chroot dir (and both have permission mode 755).

Re comment on "curl localhost/..", what I meant was "curl http://ip address/..".

Re slowcgi, according to the manpage, it actually is the implementation of fastcgi. :-)

I suspect there is something on httpd.conf that I am missing, but I copied it from the manpage.

prefork 2 server "default" { listen on egress port 80 } types { text/css css text/html htm html text/txt txt image/gif gif image/jpeg jpg jpeg image/png png application/javascript js application/xml xml }

All in all, I am still stuck.


In reply to Re: CGI on OpenBSD 5.6 httpd by slamet
in thread CGI on OpenBSD 5.6 httpd by slamet

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.