Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: How do I configure Apache to run perl scripts? (was : New to perl!)

by Caillte (Friar)
on May 24, 2002 at 15:57 UTC ( #169124=note: print w/replies, xml ) Need Help??

in reply to How do I configure Apache to run perl scripts? (was : New to perl!)

You need to put two things into your httpd.conf file. First, to tell apache what an executable is you need to put in something like:

AddHandler cgi-script cgi pl

This tells apache that any file with the extension cgi or pl is a cgi script. This still doesn't mean that your scripts will run, you also have to tell apache where you intend to run scripts from, what is called your cgi-bin directory.

ScriptAlias /cgi-bin/ /home/thing/www/cgi-bin/ <Directory /home/thing/www/cgi-bin> Options +ExecCGI </Directory>

What this does is, first, tell apache where to look for files when the it gets a request like and the other three lines tell apache that it is ok to run scripts found in that directory.

Finally, apache runs as a user. Therefore it is important that that user has read and execute (but not write) permissions for these directories and files.

This page is intentionally left justified.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://169124]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2018-02-23 19:00 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (309 votes). Check out past polls.