1

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?

1 Answer 1

0

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

2
  • 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. Commented Jul 7, 2010 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. Commented Jul 7, 2010 at 21:00

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.