Hi All, I have written a cgi script to display an image in the browser. I want to use it only locally on my computer (so it is not a public website). When I was opening this script from the browser, I see the code rather than the output of the code. I was suggested to install a webserver and configure the httpd.conf file to do this job. So, I have installed Apache in my home directory and modified the httpd.conf file to include the following (as per the suggestion given in this forum)
<Directory "/home/nagesh/apache/cgi-bin"> AllowOverride None Options ExecCGI Order allow,deny Allow from all </Directory>
After doing this, I again tried to open the cgi script (located in /home/nagesh/apache/cgi-bin) from the browser after running chmod 755 on it. This is still displaying the code rather than executing it. Can some please let me know is there any other changes I need to include in httpd.conf file to do this job. Any help would be greatly appreciated (Please note that I have no experience in webservers). Thanks very much for your attention.
Nagesh

20050727 Edit by ysth: code, br tags


In reply to Setting up Apache to execute .cgi file by chakkaln

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.