Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Apache2] Changement de répertoire et permissions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
BaNaNe
Guru
Guru


Joined: 18 May 2003
Posts: 327
Location: Vous êtes ici...

PostPosted: Wed Sep 06, 2006 8:25 am    Post subject: [Apache2] Changement de répertoire et permissions Reply with quote

Bonjour,
J'ai un problème depuis que j'ai changé le DocumentRoot d'Apache2 : il ne veut plus lister le contenu des répertoires ne contenant pas de fichier index.html/index.php.

J'ai donc déplacé le documentroot de /var/www/localhost/htdocs vers /mnt/40GO/web, j'ai remis les mêmes permissions, j'ai changé toutes les lignes contenant /var/www/localhost/htdocs en /mnt/40GO/web mais il ne veut pas lister le contenu de ces répertoires. Je lis cette ligne dans le error_log de apache :
Code:
[Wed Sep 06 09:44:04 2006] [error] [client 192.168.0.4] Directory index forbidden by rule: /mnt/40GO/web/musique/


C'est dans ce cas le repertoire musique que je veux lister.

Si je rechange le DocumentRoot, il liste les répertoires sans broncher!

Voici mon fichier /etc/apache2/vhosts.D/00_default_vhost.conf :
Code:
### Section 3: Virtual Hosts
#
# Use name-based virtual hosting.

NameVirtualHost *:80


<IfDefine DEFAULT_VHOST>
<VirtualHost *:80>
    #DocumentRoot "/var/www/localhost/htdocs"
    DocumentRoot "/mnt/40GO/web"

    #<Directory "/var/www/localhost/htdocs">
    <Directory "/mnt/40O/web">

        Options Indexes FollowSymLinks

        AllowOverride All

        Order allow,deny
        Allow from all
    </Directory>

    <IfModule peruser.c>
        # this must match a Processor
        ServerEnvironment apache apache

        # these are optional - defaults to the values specified in httpd.conf
        MinSpareProcessors 4
        MaxProcessors 20
    </IfModule>
</VirtualHost>
</IfDefine>


Voilà, je ne comprends pas vraiment ce comportement. Si vous pouviez m'aider...

Merci!
_________________
Comme c'est à la mode de mettre la config de tous ses pc...
Desktop : Intel Q9550 + 4Go DDR2 + 640Go & 1To Sata2 + HD4870
Portable : Centrino 2ghz 1Go DDR 160GO
Server Fichier : PII 400Mhz 640SDR 200GO
Back to top
View user's profile Send private message
Temet
Advocate
Advocate


Joined: 14 Mar 2006
Posts: 2586
Location: 92

PostPosted: Wed Sep 06, 2006 10:15 am    Post subject: Reply with quote

Ton 40GO, il n'est pas en FAT32 ou NTFS ?
Back to top
View user's profile Send private message
BaNaNe
Guru
Guru


Joined: 18 May 2003
Posts: 327
Location: Vous êtes ici...

PostPosted: Wed Sep 06, 2006 11:06 am    Post subject: Reply with quote

Non, j'y ai pensé aussi mais il est formatté en ext3...
_________________
Comme c'est à la mode de mettre la config de tous ses pc...
Desktop : Intel Q9550 + 4Go DDR2 + 640Go & 1To Sata2 + HD4870
Portable : Centrino 2ghz 1Go DDR 160GO
Server Fichier : PII 400Mhz 640SDR 200GO
Back to top
View user's profile Send private message
sirion2
n00b
n00b


Joined: 25 Sep 2005
Posts: 74

PostPosted: Wed Sep 06, 2006 2:45 pm    Post subject: Reply with quote

tante cela:

Code:
echo "Options Indexes" > /vers/le/rep/.htaccess


ou alors rajoute le dans la le .conf de apache
Code:

<Directory "/vers/le/rep">
Options Indexes
</Directory>

ou alors tu peux aussi le rajouter par default.
Back to top
View user's profile Send private message
blasserre
Veteran
Veteran


Joined: 10 Feb 2004
Posts: 1362
Location: Lille, Vlaanderen

PostPosted: Wed Sep 06, 2006 3:11 pm    Post subject: Reply with quote

sirion2 wrote:
tante cela:

Code:
echo "Options Indexes" > /vers/le/rep/.htaccess


ou alors rajoute le dans la le .conf de apache
Code:

<Directory "/vers/le/rep">
Options Indexes
</Directory>

ou alors tu peux aussi le rajouter par default.

+1

cool 40Go de musique libre :mrgreen:
_________________
benj

technicien professionnel, ascendant winner
Back to top
View user's profile Send private message
BaNaNe
Guru
Guru


Joined: 18 May 2003
Posts: 327
Location: Vous êtes ici...

PostPosted: Wed Sep 06, 2006 7:56 pm    Post subject: Reply with quote

Quote:

cool 40Go de musique libre :mrgreen:

Oui, si on veut ;) En fait, je veux juste permettre à quelques personnes de télécharger les morceaux que j'ai enregistré avec mon groupe (avec Audacity :p)!

Sinon, je viens de tester les solutions proposées et c'est celle-ci qui a fonctionné :
Code:

<Directory "/mnt/40GO/web/musique">
Options Indexes
</Directory>

Dans le httpd.conf.

Ce que je ne comprends pas, c'est que j'avais déjà ceci :
Code:

 <Directory "/mnt/40O/web">
      Options Indexes FollowSymLinks
       AllowOverride All
        Order allow,deny
        Allow from all
</Directory>

dans le fichier de config des vhosts (/etc/apache2/vhosts.d/00_default_vhost.conf)

Cela ne concerne-t-il pas les sous-répertoires?

Enfin, cela fonctionne très bien comme ca, merci ;)
_________________
Comme c'est à la mode de mettre la config de tous ses pc...
Desktop : Intel Q9550 + 4Go DDR2 + 640Go & 1To Sata2 + HD4870
Portable : Centrino 2ghz 1Go DDR 160GO
Server Fichier : PII 400Mhz 640SDR 200GO
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum