Forum Moderators: phranque
I have a virtual host running on Apache, let's call it
http://foo.bar.com
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:
http://foo.bar.com/script?x=1
-vs-
http://foo.bar.com/cgi-bin/script?x=1
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 http://foo.bar.com/script
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 http://foo.bar.com/script
ErrorDocument 404 http://foo.bar.com/script
DirectoryIndex script
Can anyone out there tell me what I'm doing wrong?
Thanks.