Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: how do i configure apache webserver to run perl scripts

by dushyantvaghela (Initiate)
on Mar 14, 2015 at 06:34 UTC ( [id://1120029]=note: print w/replies, xml ) Need Help??


in reply to how do i configure apache webserver to run perl scripts

You'll need to take a look at your apache error log to see what the "internal server error" is. The four most likely cases (in my experience) would be:
The CGI program is in a directory which does not have CGI execution enabled.

Solution: Add the ExecCGI option to that directory via either httpd.conf or a .htaccess file.

Apache is only configured to run CGIs from a dedicated cgi-bin directory.

Solution: Move the CGI program there or add an AddHandler cgi-script .cgi statement to httpd.conf.

The CGI program is not set as executable.

Solution (assuming a *nix-type operating system): chmod +x my_prog.cgi

The CGI program is exiting without sending headers.

Solution: Run the program from the command line and verify that a) it actually runs rather than dying with a compile-time error and b) it generates the correct output, which should include, at the very minimum, a Content-Type header and a blank line following the last of its headers.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1120029]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-24 22:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found