httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jiang, Jing" <>
Subject RE: [users@httpd] CGI Scripts
Date Tue, 24 Feb 2004 21:54:54 GMT

Thank you so much for the help of implementation of cgi script.
Right now I got error on 

You don't have permission to access /cgi-bin/cricket/grapher.cgi on this server.

I checked path along the way. All have 755 mode on directory and files. please help how to
resolve this permission issue. thanks.


-----Original Message-----
From: Boyle Owen []
Sent: Monday, February 23, 2004 12:20 AM
Subject: RE: [users@httpd] CGI Scripts

Plain text please...

ScriptAlias is an "alias" - it provides a one-to-one mapping between a
URL and a filesystem path. So when you say:

	ScriptAlias /cgi-bin/ "/www/cgi-bin/"

apache will map http://servername/cgi-bin/prog to /www/cgi-bin/prog. 

It *does not* create a searchable list of paths (like your $PATH
environment variable). So you can't have more than one ScriptAlias with
the *same* left-hand argument. That is, in your example, apache will
parse the first ScriptAlias and assign the URL "/cgi-bin" to
/www/cgi-bin. Then it will parse the second ScriptAlias, and re-assign
the URL "/cgi-bin" to /www/blast. So it will overwrite the first
ScriptAlias and forget about it.

If you need to have two directories with executable content, you have
two choices:

- Give them different URLs;

ScriptAlias /cgi-bin/ "/www/cgi-bin/" (use http://server/cgi-bin/prog)
ScriptAlias /blast-cgi/ "/www/blast/" (use http://server/blast-cgi/prog)

- Use "Addhandler" to define CGIs based on file extension rather than

AddHandler cgi-script .pl

You can apply this to specific directories for more fine-grained
control. See docs for more details.

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

-----Original Message-----
From: Matthew Hagen []
Sent: Samstag, 21. Februar 2004 14:43
Subject: [users@httpd] CGI Scripts

I have a software program that generates images through CGI Scripts.
However, the problem is that the scripts must be run in the same
directory as the software program. I believe the default directory of
where CGI scripts can be run in Apache is /cgi-bin from what I see in
the httpd.conf file :
ScriptAlias /cgi-bin/ "/www/cgi-bin/"
Is there a way I can add my software's directory to be added to run cgi
scripts ?
ScriptAlias /cgi-bin/ "/www/cgi-bin/"
ScriptAlias /cgi-bin/ "/www/blast/"
Thanks in advance,
Diese E-mail ist eine private und persönliche Kommunikation. Sie hat
keinen Bezug zur Börsen- bzw. Geschäftstätigkeit der SWX Gruppe. This
e-mail is of a private and personal nature. It is not related to the
exchange or business activities of the SWX Group. Le présent e-mail est
un message privé et personnel, sans rapport avec l'activité boursière du
Groupe SWX.

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:

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