# Problème de config Apache

**URL:** <https://www.debian-fr.org/t/probleme-de-config-apache/84387>\
**Category:** Support Debian\
**Tags:** apache\
**Created:** [Avril 13, 2021, 2:08 UTC](https://www.debian-fr.org/t/probleme-de-config-apache/84387 "2021-04-13T14:08:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Theflyingsaucer](https://www.debian-fr.org/user_avatar/www.debian-fr.org/theflyingsaucer/32/7276_2.png) [@Theflyingsaucer](https://www.debian-fr.org/u/Theflyingsaucer)\
**Post date:** [Avril 13, 2021, 2:08 UTC](https://www.debian-fr.org/t/probleme-de-config-apache/84387/1 "2021-04-13T14:08:07Z")

</div>

Bonjour.

Je voudrais me refaire une installation locale d’Apache, mais j’ai un soucis de configuration.

VirtualHost :

```
<VirtualHost 127.0.0.1:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /media/adrien/hdd/srv/http

   <Directory /media/adrien/hdd/srv/http/>
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

```

Accès au dossier (sur une autre partition, montée sans soucis) :  
J’ai fais exprès d’élargir les droits, juste pour vérifier que c’est pas ça qui bloque.

```
# ls -lha /media/adrien/hdd/srv/ | grep http
drwxrwxrwx 16 www-data www-data 4,0K mars 22 22:48 http

```

Module rewrite :

```
Module rewrite already enabled

```

Mais j’ai quand même un 403 Forbidden !  
Si je test le log :

```
# tail -n 5 /var/log/apache2/error.log
[Tue Apr 13 15:47:05.455469 2021] [core:notice] [pid 11454] AH00094: Command line: '/usr/sbin/apache2'
[Tue Apr 13 15:47:23.424295 2021] [core:error] [pid 11456] (13)Permission denied: [client 127.0.0.1:58074] AH00035: access to / denied (filesystem path '/media/adrien/hdd') because search permissions are missing on a component of the path

```

Du coups, je pense que j’ai du louper quelque chose.  
Mais j’arrive pas à savoir quoi !

Quelqu’un⋅e a une idée ?

Merci tous le monde !  
Bonnes soirée !

---

<div class="post-metadata">

**Author:** ![rodrigue7800](https://www.debian-fr.org/user_avatar/www.debian-fr.org/rodrigue7800/32/10819_2.png) [@rodrigue7800](https://www.debian-fr.org/u/rodrigue7800)\
**Post date:** [Avril 15, 2021, 2:52 UTC](https://www.debian-fr.org/t/probleme-de-config-apache/84387/2 "2021-04-15T14:52:20Z")

</div>

essaie tu en terminale :  
sudo chown -R adrien:www-data /media/adrien/hdd/srv/http

sinon tu vas voir la site : [https://www.debian-fr.org/t/permissions-www-data/79177/13s](https://www.debian-fr.org/t/permissions-www-data/79177/13s)

---

<div class="post-metadata">

**Author:** ![anon70622873](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/a/278dde/32.png) [@anon70622873](https://www.debian-fr.org/u/anon70622873)\
**Post date:** [Avril 15, 2021, 4:07 UTC](https://www.debian-fr.org/t/probleme-de-config-apache/84387/3 "2021-04-15T16:07:07Z")

</div>

> [@Theflyingsaucer](#):
>
> `because search permissions are missing on a component of the path`

Il faut vérifier que l’ensemble des dossiers de l’arborescence /media/adrien/hdd/srv/http a les droits r et x pour tous :

```auto
ls -ld /media /media/adrien /media/adrien/hdd /media/adrien/hdd/srv /media/adrien/hdd/srv/http

```

---

<div class="post-metadata">

**Author:** ![Theflyingsaucer](https://www.debian-fr.org/user_avatar/www.debian-fr.org/theflyingsaucer/32/7276_2.png) [@Theflyingsaucer](https://www.debian-fr.org/u/Theflyingsaucer)\
**Post date:** [Avril 16, 2021, 5:12 UTC](https://www.debian-fr.org/t/probleme-de-config-apache/84387/4 "2021-04-16T05:12:31Z")

</div>

Bonjour  
J’ai re-modifié le montage sur :

```
/srv/http/html - www-data:www-data - 0777

```

Après quelques bugs (j’ai oublié le DocumentRoot entre temps), maintenant ça marche…  
Désolé pour la gène.  
Et merci pour votre sollicitude.

Bonne journée.

---

<div class="post-metadata">

**Author:** ![Clochette](https://www.debian-fr.org/user_avatar/www.debian-fr.org/clochette/32/8757_2.png) [@Clochette](https://www.debian-fr.org/u/Clochette)\
**Post date:** [Avril 16, 2021, 6:02 UTC](https://www.debian-fr.org/t/probleme-de-config-apache/84387/5 "2021-04-16T06:02:26Z")

</div>

> [@Theflyingsaucer](#):
>
> `/srv/http/html - www-data:www-data - 0777`

😱

Je pense vraiment que tu devrais de toute urgence revoir tes droits.

---

<div class="post-metadata">

**Author:** ![Theflyingsaucer](https://www.debian-fr.org/user_avatar/www.debian-fr.org/theflyingsaucer/32/7276_2.png) [@Theflyingsaucer](https://www.debian-fr.org/u/Theflyingsaucer)\
**Post date:** [Avril 16, 2021, 7:19 UTC](https://www.debian-fr.org/t/probleme-de-config-apache/84387/6 "2021-04-16T07:19:45Z")

</div>

Ouais, je sais : c’est pas beau.  
Mais ça ne contient que du **code perso** dans le cadre stricte d’une **sandbox locale** avec un pare feu fermé.  
Je ne suis **— PAS EN PROD —**! Je suis pas fou !
