You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by john walsh <jo...@hotmail.com> on 2003/09/12 18:59:32 UTC

[users@httpd] cgi default file ?

Hi,

An easy question ?

I know the default file served in the /html/ tree is index.html

but what is the default file served from the /cgi-bin/ tree ?

Or is there such a thing - do you have to request a script name ?

eg. I have a directory of scripts, but I want a user to be able to just goto 
that
directory (like a web page) without specifying a script name - so then my
'index.html' file will be picked up and welcome them...

ie. http://www.domain.com/cgi-bin/      will try to serve which file ?

Thanks,
John.

_________________________________________________________________
Hotmail messages direct to your mobile phone http://www.msn.co.uk/msnmobile


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] cgi default file ?

Posted by Joshua Slive <jo...@slive.ca>.
On Fri, 12 Sep 2003, john walsh wrote:
> I know the default file served in the /html/ tree is index.html

Actually, it is whatever is on the DirectoryIndex line.  Usually that is
index.html.

> but what is the default file served from the /cgi-bin/ tree ?

If you are using ScriptAlias (and that is the most common configuration),
then you will get an error if you request a directory under /cgi-bin/
without a filename.

> eg. I have a directory of scripts, but I want a user to be able to just goto
> that
> directory (like a web page) without specifying a script name - so then my
> 'index.html' file will be picked up and welcome them...

If you need that, you'll need to remove ScriptAlias and replace it with
something like

Alias /cgi-bin /usr/local/apache2/cgi-bin
<Directory /usr/local/apache2/cgi-bin>
Options ExecCGI
SetHandler cgi-script
# The following sets the script served when the directory
# is requested
DirectoryIndex index.cgi
</Directory>

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org