Configuration to execute CGI's using apache

Discussion in 'Apache' started by Kameel, Mar 26, 2009.

  1. #1
    Hi guys.
    I'm trying to configure my apache server on Linux to execute my CGI scripts that were written in C++.
    This is what I changed in my httpd.conf file:

    ScriptAlias /cgi-bin/ "/home/Kameel/public_html/cgi-bin/"

    #
    # "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
    # CGI directory exists, if you have that configured.
    #
    <Directory "/home/Kameel/public_html/cgi-bin">
    #AllowOverride None
    Options +ExecCGI
    #Order allow,deny
    #Allow from all
    AddHandler script-cgi .cgi .pl
    </Directory>

    The problem I'm having is that when I point my browser to the CGI scripts, is that the browser asks me if I want to save the file, instead of displaying what it should.
    It makes no difference whether it is a simple 'helloWorld' CGI or a web form.
    I compiled the C++ code elsewhere and I've placed those binary files in 'cgi-bin' directory.
    I would be very grateful if anyone could tell me how to solve this problem.:)
     
    Kameel, Mar 26, 2009 IP
  2. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #2
    hans, Apr 1, 2009 IP