Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: How to configure Apache for running perl scripts.

by dsb (Chaplain)
on Aug 06, 2004 at 13:57 UTC ( #380543=note: print w/replies, xml ) Need Help??

in reply to How to configure Apache for running perl scripts.

You have to configure Apache to handle Perl scripts. This might be a good place to start before you go showing off your source code :).

You also need to print out valid HTTP headers before you can print any web content. Something your tiny script does not do.

print "Content-type: text/html\n\n";
or even better:
use strict; use CGI; my $q = CGI->new(); print $q->header("text/html");

This @ISA my cool %SIG

Replies are listed 'Best First'.
Re^2: How to configure Apache for running perl scripts.
by munu (Novice) on Aug 06, 2004 at 14:24 UTC
    Now I have added the lines you have specified..
    But now it is telling that "you do not have permission to access on this server".
    BUT I DID "chmod 777".
    In /httpd/logs/errlog file it is mentioned that "optionsExecCGI is off in this directory /var/www/html1/"
    suEXEC mechanism is enabled

      It is probably the permissions on the directory. You do not want the program to be rwx by the world, 755 should be sufficient - also with suExec it will protest at running things that appear to be owned by someone other than the user the script will be run at.


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2021-12-05 13:55 GMT
Find Nodes?
    Voting Booth?
    R or B?

    Results (31 votes). Check out past polls.