![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.
|
|
Server Platforms Discussion regarding any server based ubuntu release. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Spilled the Beans
![]() Join Date: May 2005
Beans: 13
|
Setting up Apache2 to run CGI scripts on Ubuntu
I cannot seem to get Apache2 on Ubuntu 5.10 to recognize CGI Perl scripts. I keep getting "File Not Found" errors. I suspect it is a permission error, but I have tried a bunch of things and nothing seems to work.
Here is what I did and hopefully someone can help me out. I created a cgi-bin in the /var/www/ folder so the full extenstion is now /var/www/cgi-bin I then chmod 755 cgi-bin so it is readable. Then, I created a test script, ptest.pl using this code #!/usr/bin/perl print "Content-type:text/html|n\n"; print "<html>\n\n"; print "<h1>Hi!</h1>\n; print "</html>\n\n>" And then I used the command "sudo chmod 755 ptest.pl" to make the script readable. Then I edited the apache2.conf file and removed the "#" from the "AddHandler cgi-bin .gci" So this file can be seen by Apache2. I also added the .pl extension so it now reads "AddHandler cgi-script .cgi .pl" Next, I restarted Apache2 and I cannot get any script to work in a browser. I know this sounds so basic and I have been working with Linux for more than a year as a workstation, but I am really puzzled with this one. Thank you! - - - WiLd |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|