Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with perl on apache:::

Status
Not open for further replies.

aldumil

Programmer
Sep 3, 2001
40
0
0
JP
I installed perl on apache but when I got to .cgi file it gives me a file forbidden message. Any ideas?
 
Hi,

You have to give allow the userid under which apache is running (e.g. on redhat linux user 'apache') to be able to read/exec the file.

To activate cgi you have to uncomment the AddHandler directive in httpd.conf, e.g.

AddHandler cgi-script .cgi .pl

and define the physical path of the cgi directory :

ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"

You also need :

LoadModule cgi_module modules/mod_cgi.so

and

AddModule mod_cgi.c

in the appropriate sections of httpd.conf . Also you would need something like the following for the cgi-bin directory :

<Directory &quot;/usr/local/apache/cgi-bin&quot;>
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>


All of the above is for linux/unix but would be very similar for M$ although, obviously, if you are using a windows version of apache the paths above would be rather different.

Hope this helps




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top