I've two perl scripts one functions such as the client (and queries) another functions such as the server and returns information. With an Apache server (not my very own) they work perfectly.

However, on my small ubuntu/Linux_box with Apache2 (which i setup) they don't I recieve a 404 not found error. The cgi-bin directory is situated at usr/lib/cgi-bin. What specific files/configurations etc need to be transformed/changed/etc. And, what specific changes/modifications/etc. are necessary?

Edit: I transformed the httpd.conf and attempted both from the following (but neither labored):

ScriptAlias  /diag/ /usr/lib/cgi-bin
ScriptAlias  /diag/ /usr/lib/cgi-bin/

I'm utilizing a perl script because the client, and it didn't work. For illustration reasons Cleaning it once a to discover the file using the browser proven within the second pic.

linux

ms

If they're receiving 404, this means the file doesn't even appear in the right location. Within the httpd.conf search for the "ScriptAlias" directive which has an entry for cgi-bin, ought to be something similar to

ScriptAlias /cgi-bin/ /some_folder/cgi-bin

Knowing the right folder, the 404 error is going away.

Two other points - 1. For cgi files, be sure that the execute bit is placed. 2. Verify the location of perl matches the main one within the perl script.