PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.info.servers.unix > Apache Directory listing problem
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.info.servers.unix Web servers for UNIX platforms.

Apache Directory listing problem

Réponse
 
LinkBack Outils de la discussion
Vieux 25/03/2005, 20h52   #1
Tom Cat
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Apache Directory listing problem

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 /

But none of that has worked.

Can anyone me?

Thanks

  Réponse avec citation
Vieux 26/03/2005, 05h30   #2
Tim
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 22h33.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,07880 seconds with 10 queries