PDA

View Full Version : CGI Not Working


mfiendd
6th July 2006, 05:02
Hey everyone, I'm using Fedora 5 following the How To Guide. I'm not using ISPConfig since the enivorment is only for one site. I managed to setup everything just fine except running CGI scripts. I also changed the path to the folder and moved the folder. I made the appropriate changes in the httpd.conf. I also uncommented the Add Handlers for CGI and added one for PL scripts. I chmod the files to 755 to be executable. When calling the script I get Error 403 Forbidden. To also note, I did enable the use of .htaccess files, I do not have one in the cgi-bin or root html folder.


I have attached the httpd.conf file since it is too large.


I searched the site and found topics on Debian, and when using ISPConfig, nothing usefull for me.

Any help is greatly appreciated. Many thanks in advance.

MfiendD

falko
7th July 2006, 11:21
What's the output of ls -la /path/to/cgi-bin?

mfiendd
8th July 2006, 02:49
Output of ls -la /path/to/cgi-bin
drwxr-xr-x 3 apache apache 4096 Jul 5 18:23 .
drwxr-xr-x 3 myusername myusername 4096 Jul 5 18:23 ..
-rwxr-xr-x 1 myusername myusername 379 Jul 5 18:23 hello_world.pl
drwxr-xr-x 2 myusername myusername 4096 Jul 5 16:27 htedit

falko
9th July 2006, 14:15
Can you post the real path here?

mfiendd
9th July 2006, 21:11
/var/www/html/scripts/cgi-bin/

falko
10th July 2006, 13:51
What's the URL you use to call the CGI script? Must be something like http://www.example.com/cgi-bin/hello_world.pl

mfiendd
11th July 2006, 02:36
http://ipaddresss/scripts/cgi-bin

I edited the httpd.conf file to change the location of the cgi-bin to the correct path of /var/www/html/scripts/cgi-bin/. Even with the defualt path, nothing was working.

falko
12th July 2006, 13:39
But you have

ScriptAlias /cgi-bin/ "/var/www/html/scripts/cgi-bin/"

in your httpd.conf, so you must use http://ipaddresss/cgi-bin instwad of http://ipaddresss/scripts/cgi-bin.