Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've reviewed numerous guides to find out why my CGI isn't working and cant' seem to find it. My site config looks like this:

<VirtualHost *:80>
 ServerName  dev.domain.com

 # Directory Root.
 DocumentRoot /sites/dev.domain.com/www/

 # CGI Directory
 ScriptAlias /cgi-bin/ /sites/dev.domain.com/cgi-bin/
 <Location /cgi-bin>
   Options +ExecCGI
 </Location>
 <Directory /sites/dev.domain.com/www/bugzilla>
   Options ExecCGI
   AddHandler cgi-script cgi pl
 </Directory>

 # Logfiles
 ErrorLog  /sites/dev.domain.com/logs/error.log
 CustomLog /sites/dev.domain.com/logs/access.log combined
</VirtualHost>

I'm trying to get CGI on /bugzilla. I'm not sure if it runs on cgi-bin or not. I also installed perl using sudo aptitude install libapache2-mod-perl2

Update

The CGI bin is not within my www directory, is there a way that I can test it via command line?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Obvious answer first: You're restarting Apache, right?

Otherwise, I don't think you need to explicitly state +ExecCGI for /cgi-bin -- The ScriptAlias directive should do that automatically. And why not just use the ScriptAlias directive on the bugzilla directory, if that's what you want? Removing the uncessary Location and Directory sections might help out.

Does this work OK for cgi-bin? If so, you may want to copy the functionality a bit closer, by using the ScriptAlias directive, etc.

If none of that helps, can you let us know exactly how it fails? Are you getting 404s? The text of your cgi-scripts?


--Christopher Karel

share|improve this answer
    
I get the text of my CGI scripts outputted on the page. The CGI bin is outside of www so I'm not sure how to access it. –  Webnet Jul 7 '10 at 18:04
    
The Script alias defines what URL you use to get it. From your example of ScriptAlias /cgi-bin/ /sites/dev.domain.com/cgi-bin/, you would access a cgi bin as www.site.com/cgi-bin/script.cgi. –  Christopher Karel Jul 7 '10 at 21:00

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.