Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 316
  • Last Modified:

how to set .pl & .cgi execute permission for virtual host

I have configured virtual host www.rsc.com in apache 1.3.x but when I run the .pl file it says execution permission denied.... I have configure .pl & .cgi to run from any directory using addhandler & also in windows host file, i'm able to see htm files in browser of this virtual host

If i disable virtual server then with localhost call it the .pl executes in any directly perfectly

What setting I have to give to enable .pl execution for vitual host & is there any gui application available which makes configuration task simple!!!

Rajesh
0
rajeshvb
Asked:
rajeshvb
  • 2
1 Solution
 
samriCommented:
Hi Rajesh,

You must make sure that the perl program is executable - I think, set eXecute permission needs to be set.  Personally, I would do "chmod +x file.pl" or "chmod 755 file.pl"

You could further test by running the code in shell prompt - try doing "perl file.pl", and see if it runs ok.

good luck.
0
 
rajeshvbAuthor Commented:
I forgot to specify the OS is windows 98 so chmod & shell is not applicable

and this perl file is tested in non-virtual environment & it works i think there is some setting in apache which needs to be done for virtual host so that execute permission are give this this site also, so what is that setting?

Rajesh
0
 
samriCommented:
Hi Rajesh,

You could add AddHandler to the Vhost, and include ExecCGI in the Directory Directive for the respective directory,


<VirtualHost ..>
  DocumentRoot  c:/wherever/
  <Directory "C:/Wherever/">
    Option +ExecCGI
  </Directory>
  AddHandler cgi-script .cgi .pl
</Virtual Host>
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now