Virtual host, j'aimerais comprendre !
Bonjour,
Je commence le tutoriel sur le Zend framework.
Lorsque je suis son code en créant ce virtual host :
Code:
1 2 3 4 5 6 7 8 9 10
| <VirtualHost *:80>
ServerName zftutorial.localhost
DocumentRoot /var/www/html/zftutorial/public
SetEnv APPLICATION_ENV "development"
<Directory /var/www/html/zftutorial/public>
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
</VirtualHost> |
Avec ceci dans /etc/hosts : 127.0.0.1 zftutorial.localhost localhost, ça fonctionne.
Si je transforme ainsi le virtual host :
Code:
1 2 3 4 5 6 7 8 9 10
| <VirtualHost *:80>
ServerName zftutorial
DocumentRoot /var/www/html/zftutorial/public
SetEnv APPLICATION_ENV "development"
<Directory /var/www/html/zftutorial/public>
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
</VirtualHost> |
et ainsi le /etc/hosts : 127.0.0.1 zftutorial localhost, ça ne fonctionne plus.
Dans le premier cas, si j'appelle l'URL http://zftutorial.localhost/, j'affiche bien la page d'accueil de la skeleton application Zend Framework.
Dans le second cas, si j'appelle http://zftutorial, j'affiche l'arborescence depuis la racine du site.
But WHY ! 8O