Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DirectoryIndex not working for cgi-bin

Status
Not open for further replies.

rsgalloway

Programmer
Sep 21, 2005
1
US
Hello all,

I have a virtual host running on Apache, let's call it


The scripts alias has been set to the root level, i.e. instead of a cgi-bin, all the files in my directory are scripts (no extensions). It's just a way of removing the .../cgi-bin/... from the URL:

-vs-

Now, I'm trying to use the DirectoryIndex directive to call a script since I can't put an hmtl file in there, like index.hmtl, for example (notice no extension):

DirectoryIndex script

The problem I'm having is I keep getting a 403 Forbidden "You don't have permission to access / on this server." error whenever I try to load the page.

I've even tried putting in an error handling directive like

ErrorDocument 403
and that doesn't work either. Here are my directives:

ServerName foo.bar.com
DocumentRoot /home/bar.com/foo
ScriptAlias / "/home/bar.com/foo/"
<Directory "/home/bar.com/foo">
AllowOverride All
Options none
Order allow,deny
Allow from all
</Directory>
ErrorDocument 403 ErrorDocument 404 DirectoryIndex script

Can anyone out there tell me what I'm doing wrong?

Thanks.
 
Now, I'm trying to use the DirectoryIndex directive to call a script since I can't put an hmtl file in there, like index.hmtl, for example (notice no extension):

DirectoryIndex script

The problem I'm having is I keep getting a 403 Forbidden "You don't have permission to access / on this server." error whenever I try to load the page.

Been a while since I used Apache so someone else can chime in if this has changed, however using the directive you have above without an extension tells Apache to pull up any file it finds that is called script, no matter what the extension is, it will not work the way you are wanting it to.

Hope this helps

Wullie

Fresh Look - Quality Coldfusion/Windows Hosting

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top