Re: Apache Directory listing problem
On 25 Mar 2005 12:52:14 -0800,
"Tom Cat" <stry_cat@yahoo.com> posted:
> I added the following to the default httpd.conf file on FC3.
>
> Alias /FOOBAR/ "/tmp/junk/"
> <Directory "/tmp/junk/">
> AuthUserFile /etc/httpd/htpasswords
> AuthType Basic
> AuthName "FOOBAR"
> require valid-user
> </Directory>
>
> and I restarted apache
>
> I then did htpasswd -c /etc/httpd/htpasswords strycat
> and typed in the password like it asked
>
> Now when I go to my site it gives me a directory listing (as there
> isn't an index.html file). However the only thing the directory
> listing shows is subdirectories. It will not show any of the files.
>
> I've tired chmod -R a+rwx /tmp/junk
> I then tried removing from httpd.conf the IndexIgnore directive in the
> root directory.
> I tired adding an optioins all directive to the /tmp/junk directory.
> I've tired /tmp/junk with and without the trailing /
One possible issue: The naming of the files in there. Give us a few
examples.
One very likely issue: You've got selinux enabled on Fedora Core 3 Linux,
and it doesn't allow HTTPD to read files just anywhere on the system
without the proper context. There's a Fedora FAQ about this at:
<http://fedora.redhat.com/docs/selinux-apache-fc3/>
I'm in two minds about the usefulness of selinux. I'm just running it on a
test machine, so I decided to stop using selinux rules with Apache, while
still leaving it doing whatever else it does. The security level config
control panel lets you do that. The alternative is to change the context
of the directory and files that you want Apache to serve out, and leave
selinux running as it already was. That FAQ also says how to do this.
Do you really need to serve files from /tmp/junk/ though? Not doing so's
another solution: Serve them from a location that Apache is already
allowed to serve from.
--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.
This message was sent without a virus, please delete some files yourself.
|