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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Default Document on CGI Directory

Status
Not open for further replies.

NigeW

Programmer
Jun 10, 2002
134
NZ
Hi

I am setting up a content management area.

I want my client to access the area by typing and for this to load the default document, in this case "index.cgi".

When calling I get a "403 Forbidden" error message.

When calling the file directly ( the page loads fine.

The site is on an Apache server.

I have loaded index.cgi as a default document for the site and applied the changes.

The /admin directory has been aliased as a CGI directory

The permissions on index.cgi are 755.

I tried setting up an .htaccess file but would always get a pop-up logon box , which I don't want.

Is there anyway I can get this thing to work - seems so simple in concept but proving a nightmare for me.

Thanks

Nige
kiwi-kid
 
Hi sleipnir

Thanks for the link.

These are the current settings for directory indexes

index.cgi index.html index.shtml /admin/index.cgi

I still get the 403 Forbidden message.

I might just get client to bookmark the full URL path.

Thanks again for your input.

Nige
kiwi-kid
 
You should not need this, remove it:

/admin/index.cgi

DirectoryIndex is not path based, only file based.

I am assuming that if you go to the CGI directly it works?

If not then the problem is not in apache. If so we can go to the next step.
 
You shouldn't need to do this but if you want a quick workaround until you find the problem, you could add an alias for admin thats points to the cgi script.

Hope this helps

Wullie


The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
When you removed /admin/ did it start working as expected?

 
Hi Siberian

Sorry no it is still a "dead duck" when you omit the acutal file name from the URL string

Nige
kiwi-kid
 
Isn't Apache designed to keep from allowing access to the cgi-bin by directory? I seem to remember reading this in the documentation, it's supposed to be a security measure.
 
Yes but he isn't using cgi-bin, he has enabled the .cgi extension to be associated with the CGI handler in apache. This is legit, I've built more sites then I can count around it.

What does your error log say when you try to access it as an index?
 
OOOH, OOOH, I know the answer!!! Pick me!! Pick me!!!

When you define an alias, you need to use the trailing slash at the end of the path. When you define the directory container you do NOT use the slash. For example it should look like this:
<Directory &quot;/path/to/admin&quot;> This is correct
<Directory &quot;/path/to/admin/&quot;> This is wrong

If you use the trailing slash, you force people to have to use it in their browser.

 
Thanks for all the feedback.

I will try the alias and let you know.

Thanks again

Nige
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top