need index.html page?

cutter44

Verified User
Joined
Aug 20, 2004
Messages
5
With my other hosts and domains, I can create a folder for a client, say "smith" and upload a file to the folder. Then I send the client the link: http://www.mydomain.com/smith and he can see a list of the files I've uploaded to that folder for him to choose from.

If I try to do that with DirectAdmin, I get a Forbidden page when trying to access that link. I want the client to be able to select which of the files to download. He should have access to any file in his folder. What am I doing wrong? I've set permissions on the file and the client's folder to 755.

Thanks.
 
One way of doing that is to create (with your fav editor) an .htaccess file in that directory and put this in it:

Options +Indexes

Then save, close and test it.
 
That may be so, but I'm curious as to why I would have to do that.

As I said, usually I just make a folder and upload files, and they appear in an index. I've never had to create a special page for them to show up. Is this a function (or non-function) of the control panel or of the hosting company, or both or neither?
 
Hey,

It could be either... Depends on how the control panel creates the site and/or how the hosting company tells the control panel to create the site... Or, some other unknown.

The Options directive can be used in several places. Take a look here:

http://httpd.apache.org/docs/mod/core.html#options

It's possible it (indexes) was used for your public directory, which would explain why you could simply create a directory and it worked.

Doing it the way kark recommended allows you to decide which directories you want publicly viewable.

David
 
By Default DA configures apache to not show indexes period. If you would rather change this to always show indexes, modify hte httpd.conf file if you have access and change the -Indexes to +Indexes for the /home directory

For example Instead of this:
Code:
<Directory /home/*>
    AllowOverride All
    Options MultiViews -Indexes FollowSymlinks IncludesNoExec +Includes
....................................................................
</Directory>

Change it to this
Code:
<Directory /home/*>
    AllowOverride All
    Options MultiViews +Indexes FollowSymlinks IncludesNoExec +Includes
.....................................................
</Directory>
 
Thank you for the tips, folks. Unfortunately for me, it seems a bit beyond my capabilities. I was hoping I just forgot to check or uncheck a box or something.

I'll probably just continue to use my other sites for client uploads.
 
Hey,

Just post/e-mail/attach the httpd.conf file and I'll change it for you.

Regards,
Saman
 
You're very kind, but I wouldn't know that file if it were right in front of me, nor would I know where to begin to find it.
 
Cutter,

Do you own the server? Or are you a hosting client of a hosting company?

If you're the client of a hosting company and if you can't do it yourself, then you should ask your hosting company's tech support to take care of it for you.

They should be willing to do it; I know we'd be happy to do it for our clients.

But in the long run if you're developing sites in html, then probably you should at least buy a book on html programming. Any beginners book on html will tell you how to create and upload .htaccess files.

Jeff
 
jlasman said:
Cutter,

Do you own the server? Or are you a hosting client of a hosting company?

No, I'm just a hosting client of the hosting company.

If you're the client of a hosting company and if you can't do it yourself, then you should ask your hosting company's tech support to take care of it for you.

They should be willing to do it; I know we'd be happy to do it for our clients.
I've just asked over there. Hopefully it can be done easily.

But in the long run if you're developing sites in html, then probably you should at least buy a book on html programming. Any beginners book on html will tell you how to create and upload .htaccess files.

Jeff

Not developing sites. I'll leave that to the people who know what they're doing. :-)

Thanks for all the advice.
 
Who needs to buy books? There's google and the online manuals :p

Since your not the administrator you wouldn't have been able to edit the main httpd.conf so it doesn't matter, you will have to go through your hosting provider to have them configure it for you.
 
jmstacey said:
Who needs to buy books? There's google and the online manuals :p

Since your not the administrator you wouldn't have been able to edit the main httpd.conf so it doesn't matter, you will have to go through your hosting provider to have them configure it for you.

Althought they probably won't, for security reasons.

Just create a file called ".htaccess" (WITH the dot at the beggining), with the following Content:

Code:
Options +Indexes

Then save it, got the directory you want listings to be enable on, press Ctrl + F5 to refresh the page and it should work.
 
I think .htaccess files are also recursive so try putting one ine the public_thml directory and making sure every subdirectory does not have another .htaccess or index.html file otherwise it will overide the settings.

Haven't tried it though.
 
Yes, as long as there are no .htaccess files in other directories (many forums and other scripts do this for security reasons).

I wouldn't recommend this, since it means people can see contents of your directoriex very easily in some situations - which is no good.
 
saman said:
Just create a file called ".htaccess" (WITH the dot at the beggining)
Which is exactly what the second post in this thread says.

And what the original poster rejected as to complex to implement.

Jeff
 
Back
Top