Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f105da5fab | |||
| 0bda4e3965 |
24
Readme.md
24
Readme.md
@@ -7,8 +7,13 @@ créer 2 répertoires foo et bar dans /var/www/html
|
|||||||
dans bar -> créer le fichier bar.html
|
dans bar -> créer le fichier bar.html
|
||||||
|
|
||||||
dans foo -> créer le fichier foo.html
|
dans foo -> créer le fichier foo.html
|
||||||
|
```bash
|
||||||
|
mkdir /var/www/html/{foo,bar}
|
||||||
|
echo foo > /var/www/html/foo/foo.html
|
||||||
|
echo bar > /var/www/html/bar/bar.html
|
||||||
|
```
|
||||||
|
|
||||||
dans /etc/httpd/conf.d/zmy.conf:
|
dans /etc/httpd/conf.d/my.conf:
|
||||||
```apache
|
```apache
|
||||||
<Directory /var/www/html>
|
<Directory /var/www/html>
|
||||||
DirectoryIndex foo.html
|
DirectoryIndex foo.html
|
||||||
@@ -17,8 +22,21 @@ dans /etc/httpd/conf.d/zmy.conf:
|
|||||||
|
|
||||||
Question 1: Qu'est ce qui s'affiche quand on va accéder à chaque contenu ?
|
Question 1: Qu'est ce qui s'affiche quand on va accéder à chaque contenu ?
|
||||||
```bash
|
```bash
|
||||||
curl localhost/bar/
|
curl lia.fr/bar/ - on obtient le contenu du répertoire bar
|
||||||
curl localhost/foo/
|
curl lia.fr/foo - on obtient le contenu du fichier foo.html
|
||||||
```
|
```
|
||||||
|
|
||||||
Question 2: Faire en sorte que le DirectoryIndex de foo soit le fichier foo/foo.html et celui de bar soit bar/bar.html
|
Question 2: Faire en sorte que le DirectoryIndex de foo soit le fichier foo/foo.html et celui de bar soit bar/bar.html
|
||||||
|
|
||||||
|
```bash
|
||||||
|
#/etc/httpd/conf.d/my.conf
|
||||||
|
<Directory /var/www/html/bar>
|
||||||
|
DirectoryIndex bar.html
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
#ou
|
||||||
|
<Directory /var/www/html>
|
||||||
|
DirectoryIndex foo.html bar.html
|
||||||
|
</Directory>
|
||||||
|
```
|
||||||
|
:;qa
|
||||||
Reference in New Issue
Block a user