NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

winsbury's avatar
winsbury
Aspirant
Nov 15, 2010

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

Forbidden
You don't have permission to access /intranet/cgi-bin/helloworld.pl on this server.

I've checked via SSH that perl is installed and working and the script runs from the shell command correctly:

nas:/# cd intranet/cgi-bin
nas:/intranet/cgi-bin# perl helloworld.pl

Content-type: text/html
<H1>Hello World</H1>

I found a note in the forum suggesting that cgi/perl is not active by default on shares but did not include instruction how to modify this setting. Does anyone know whether this is possible and if so what I need to do to enable scrips to run ?

Thanks in advance.

12 Replies

  • winsbury wrote:
    Whocares? wrote:
    httpd.conf will get overwritten on Firmware updates

    yes this is quite true and quite a problem - especially since there are other changes to this file needed for wordpress / php / phplists and similar other popular add-ons. My solution is to carefully document all changes made to such files so that they can be repeated later if necessary but it would be MUCH neater if some level of customisation could be tollerated and still allow standard upgrades.

    Working on that, albeit from a *very* different angle ;)

    winsbury wrote:
    Whocares? wrote:
    It will actually restart apache

    I must admit I didnt test this aspect very thoroughly and certainly didnt restart the browser or flush the cache, so you are probably right.

    It's not really important, I just wanted to clarify a bit on your otherwise fine mini-tutorial.

    winsbury wrote:
    Assuming the steps are done correctly first time (...)

    Yeah, been there, too ;)

    -Stefan
  • Having been round this loop a few times, repeating after each upgrade for the ReadyNAS, I think I've found the simplest solution.

    Create a file called /etc/frontview/apache/addons/cgi.conf with one line:
    ScriptAlias /website/cgi-bin/ /c/website/cgi-bin/

    (Your paths may differ)
    This file should get picked up by httpd.conf via an Include statement as outlined in previous posts.

    See http://httpd.apache.org/docs/2.2/mod/mod_alias.html#scriptalias for documentation.
    ScriptAlias URL-path file-path|directory-path

    Any good?

NETGEAR Academy

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

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More