2

I'm trying to install CGIProxy on Ubuntu.

http://www.jmarshall.com/tools/cgiproxy/install.html#install

Basically it's a single "nph-proxy.cgi" file which I placed in my /var/www folder.

I used this command from the instructions:

./nph-proxy.cgi install-modules

Nothing seems to happen and when I navigate in my browser to the ip address with the "nph-proxy.cgi", all I see are a whole page of code whereas instead I should see a GUI form.

I'm still new to linux and modules and any help is greatly appreciated.

Thanks

1 Answer 1

1

That means that the web server doesn't know that at this location, a file ending with '.cgi' should be executed rather than passed directly to the browser. You need to configure the web server in such a way that the directory in which nph-proxy.cgi resides or the extension are automatically considered programs. The specifics of the configuration will depend on your web server (Apache, lighttpd etc.).

Or try to move the file into an existing directory (such as /var/server/www/cgi-bin/) that is already configured for executables.

To configure Apache, open the file (with sudo or gksu) /etc/apache/apache2.conf:

gksu gedit /etc/apache/apache2.conf

Search whether there is a line like this:

ScriptAlias /cgi-bin/ /some/directory/or/another/cgi-bin/

If yes, create that directory (sudo mkdir /some/directory/blah/blah/cgi-bin/) and put your CGI script there. If not, add this line. Then when you call the URL

http://your.machine.blah.foo/cgi-bin/nph-proxy.cgi

it will be executed.

Alternatively, you can allow the CGI scripts to be executed in a particular directory. Put the following in your config file:

<Directory /the/directory/where/your/script/is/>
   Options +ExecCGI
</Directory>
AddHandler cgi-script cgi pl

(check whether the AddHandler line is already in your config!)

2
  • I'm using Apache right now, unfortunately I don't have a cgi-bin folder already configured. How do I configure the server to allow the directory to allow cgi execution?
    – jc.yin
    Jul 11, 2013 at 10:04
  • I added some information.
    – January
    Jul 11, 2013 at 10:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .