Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi,
I was hoping someone could help me with this. I have a mdk server setup with apache 2 and no mod_perl. I am trying to serve cgi-scripts and its not working propperly. The site that I am trying to setup the cgi-bin and access for is a virtual server.
I have the following in my apache config files (in various places):
#Begin
#"domain" has been substituted for the real #domain name. "user" has been subbed for #the real user account name
AddHandler cgi-script .cgi
#...
<Directory /home/user/cgi-bin>
Options ExecCGI Indexes
Order allow,deny
Allow from all
</Directory>
#...
NameVirtualHost 192.168.0.2
#...
<VirtualHost 192.168.0.2>
DocumentRoot /home/user/public_html
ServerAdmin webmaster@domain.com
ServerName domainname.com
ServerAlias www.domainame.com
ScriptAlias /cgi-bin/ /home/user/cgi-bin/
</VirtualHost>
#EndWhen i try to run the scripts, it just lets me download them. When I try to run the scripts manually (ex. "./scriptname.cgi") from the command line it says that i have a bad interpreter. When I run "perl scriptname.cgi" it works fine. I have checked the first line of the script and it points to what the system says is the perl interpreter ("#!/usr/bin/perl"). It all seems to add up, but it doesn't work. My thinking is that apache is having the same problem dealing with an interpreter, but since its specified at the begining of the file, i dont know what else i can do?
Any help would be greatly appreciated. Thank you

are you sure perl is in that location?
Typewhich perl
to verify.
Also make sure the scripts are executable (have the executable bit on)chmod a+x script.cgi

I am positive that it is in the right place and that the perl scripts point to it. The directory and its files all have perissions of 755. Any other ideas? Thanks

![]() |
FreeBSD Books
|
postgres crash
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |