Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to configure a directory as cgi-bin using .htaccess, but when I try to access the executables, the files are downloaded. I'm using apache2.2. What is the problem?

My .htaccess looks like:

# cat www/cgi-bin/.htaccess
Options +ExecCGI
AddHandler cgi-script cgi pl

File permissions are

# ls -1la www/cgi-bin/
total 60
drwxr-xr-x 2 root root  4096 iun 10 19:22 .
drwxr-xr-x 5 root root  4096 iun 10 19:18 ..
-rw-r--r-- 1 root root    46 iun 10 19:23 .htaccess
-rwxr-xr-x 1 root root 15358 iun 10 19:23 paperload.cgi
-rwxr-xr-x 1 root root 12728 iun 10 19:23 papers.cgi
-rwxr-xr-x 1 root root 12593 iun 10 19:23 paperview.cgi
share|improve this question
add comment

1 Answer 1

Don't forget your dots:

Options +ExecCGI
AddHandler cgi-script .cgi .pl

Make note that you also have to modify the AllowOverride directive for that directory to allow your .htaccess files to be read.

Don't forget to restart Apache.

share|improve this answer
    
It still doesn't work. –  Alexandru Jun 10 '11 at 18:01
    
@Alex please see additional info. –  John T Jun 10 '11 at 18:01
add comment

Your Answer

 
discard

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.