httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <>
Subject RE: [users@httpd] How to use another folder as CGI folder?
Date Wed, 14 May 2003 10:51:34 GMT
>-----Original Message-----
>From: []
>	I have already configured httpd.conf properly as follow:
>		ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
>	And I have tested the test-cgi, which is in this 
>folder, the output
>is correct. 
>	But my question is :
>	How can I display CGI script from different folder, for 
>example, I
>got several CGI scripts which is stored in 
>		/home/harry/lbone-0.8.4/cgi/src
>	What should I do?   Configure the httpd.conf, but I 
>have added the
>following lines into httpd.conf:
>	ScriptAlias /my-cgi-bin/ "/home/harry/lbone-0.8.4/cgi/src/"

This is correct. You should now be able to execute CGI progs with the


Is this the form of URL you were using?

>	<Directory "/home/harry/lbone-0.8.4/cgi/src">
>   		 Options All

This is OK, but the important Option is "ExecCGI".

>    		AllowOverride All

You don't need this unless you have a .htaccess file in this directory.
Do you? It would be a bit odd if you did...

>    		Order allow,deny
>    		Allow from all
>	</Directory>
>	AddHandler cgi-script .cgi pl

You don't need this if you are using ScriptAlias to define a CGI dir.
However, it doesn't do any harm.

>	Unfortunately, it still doesn't work.  

What does "doesn't work" mean? There are lots of ways a CGI request can
fail... Does it:

- 500 Internal Server Error
- 401 Unauthorized
- 403 Forbidden
- 404 Not found
- list the source code
- prompt you for a download
- make your computer explode
- something else....

while you're at it, what does it say in the error_log...

Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 

> Any ideas?  
>please help me ,
>I was blocked by this problem for two days.
>	Thanks a lot!
>The official User-To-User support forum of the Apache HTTP 
>Server Project.
>See <URL:> for more info.
>To unsubscribe, e-mail:
>   "   from the digest:
>For additional commands, e-mail:

This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please notify the sender urgently
and then immediately delete the message and any copies of it from your
system. Please also immediately destroy any hardcopies of the message.
You must not, directly or indirectly, use, disclose, distribute, print,
or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail
communications through their networks. Any views expressed in this
message are those of the individual sender, except where the message
states otherwise and the sender is authorised to state them to be the
views of the sender's company. 

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message