NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
winsbury
Nov 15, 2010Aspirant
Enable Perl / CGI on NV+ shared HTML directory
I have a share ( intranet ) set up as html and the website works great for html but will not execute .pl or cgi files. http://IPaddress/intranet/cgi-bin/helloworld.html ...
winsbury
Nov 16, 2010Aspirant
Managed to figure it out, so here' show to Enable Perl / CGI on NV+ shared HTML directory for anyone else that is trying to figure it out:
httpd.conf includes a number of additional .conf files when it runs on reboot. We therfore need to add a CGI.conf
file to this list that will contain definitions for any new cgi-bin locations on shares.
1. edit httpd.conf to ensure the additional .conf files are loaded last.
SSH login using PuTTY or similar to root/admin.
change the sequence of the last two lines
from :
to:
save the file.
2. Create a new .conf file for the cgi-bin's
Save the file.
3. Reboot the Readynas to pick up the changes.
4. Create a test .pl file
SSH login using PuTTY or similar to root/admin.
Save the file.
5. Go to a browser and run the file:
If it does not work, check the permissions on the file ( CHMOD if necessary ) and also that you created
the .pl file using vi. Files created by notepad or wordpad dont work properly because the EOL character
used in Windows is incorrect.
httpd.conf includes a number of additional .conf files when it runs on reboot. We therfore need to add a CGI.conf
file to this list that will contain definitions for any new cgi-bin locations on shares.
1. edit httpd.conf to ensure the additional .conf files are loaded last.
SSH login using PuTTY or similar to root/admin.
cd /etc/frontview/apache/
vi httpd.conf
change the sequence of the last two lines
from :
Include /etc/frontview/apache/addons/*.conf
Include /etc/frontview/apache/Shares.conf
to:
Include /etc/frontview/apache/Shares.conf
Include /etc/frontview/apache/addons/*.conf
save the file.
2. Create a new .conf file for the cgi-bin's
cd /etc/frontview/apache/addons/
vi CGI.conf
Alias "/intranet/cgi-bin" "/c/intranet/cgi-bin"
<Location "/intranet/cgi-bin">
Options ExecCGI
Allow from all
</Location>
Save the file.
3. Reboot the Readynas to pick up the changes.
4. Create a test .pl file
SSH login using PuTTY or similar to root/admin.
cd intranet/cgi-bin
vi test.pl
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "<H1>Hello 2 my World</H1>\n";
Save the file.
5. Go to a browser and run the file:
http://serverip/intranet/cgi-bin/test.pl
If it does not work, check the permissions on the file ( CHMOD if necessary ) and also that you created
the .pl file using vi. Files created by notepad or wordpad dont work properly because the EOL character
used in Windows is incorrect.
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!