Is it possible to call a cgi script from the index.html file so that the output shows up on the home page?

On the chance that you phrased your question a bit too narrowly, I'll answer the broader question "Is it possible to invoke a CGI script instead of index.html?"

Yes. Details for how to do this depend on what web server you're using. Apache and IIS can both be configured with a list of names to try to figure out how to handle   http://www.example.com/ index.cgi can be on that list. Assuming you've also configured the web server to execute CGIs, index.cgi will get invoked no other file on the list is found first.

With Apache, you can arrange, on a per-directly basis, to have .html mean CGI. Consult the Apache docs.


In reply to Re: Running a cgi script from index .html by dws
in thread Running a cgi script from index .html by mnlight

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.