Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just received today my dedi server access, I installed apache:

yum install httpd

After it, I configured httpd.conf located in /etc/httpd/conf, I modified server name, added server IP, and my email.

Perl was installed already, when I type perl -v I get:

This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi

I installed mod_perl:

yum install mod_perl

I edited again /etc/httpd/conf/httpd.conf, and I added:

AddHandler cgi-script .cgi .pl
Options +ExecCGI


<Directory "/var/www/cgi-bin">
    AddHandler cgi-script .cgi .pl
    Options +ExecCGI
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all

I uploaded via sFTP a hello world cgi file to /var/www/cgi-bin, when I browse the file I get Internal Server Error. I already gave the file 755 chmod

Hello world file:

print("Content-type:text/html\n\nHello World!");

URL to test:

Please HELP!

share|improve this question
@user993553 you should submit that as an answer, not just a comment; it looks promising to me. – pjmorse Jun 19 '12 at 18:45
it's working now thanks, please submit it as answer to mark it as valid answer – Hamza Jun 19 '12 at 18:48
up vote 1 down vote accepted


share|improve this answer
Thanks, I play know with perl.conf – Hamza Jun 20 '12 at 18:03

Based upon your configuration it sure looks like you're trying to run your perl script from the perl cgi binary, not mod_perl, which is not what you seem to think it is.

What does your error log say? It would be most helpful if you posted that. I'm betting that ExecCGI is disabled further up the tree.

share|improve this answer
Fixed, I added the script Alias in perl.conf, restarted apache, and the test worked – Hamza Jun 20 '12 at 18:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.