#1 Le 22/11/2007, à 18:49
- elekaj34
[resolu] Problème suite à l'installation d'un VirtualHost
Bonjour,
L'installation est faite sur une Ubuntu 7.10, avec LAMP d'installé.
Le fichier de conf du VirtualHost par défaut (/etc/apache2/sites-available/default)
NameVirtualHost 127.0.0.1
NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
#RedirectMatch ^/$ /apache2-default/
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
#RedirectMatch ^/$ /apache2-default/
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
Puis les fichiers de conf des VirtualHost rajouté, le 1er
<VirtualHost 127.0.0.1>
DocumentRoot /var/www/elekaj/stable
ServerName elekaj.localhost
</virtualHost>
Le second
<VirtualHost 127.0.0.1>
DocumentRoot /var/www/elekaj/dev
ServerName elekaj-dev.localhost
</Virtualhost>
et le dernier
<VirtualHost 127.0.0.1>
DocumentRoot /var/www/phpMyAdmin
ServerName phpmyadmin.localhost
</virtualHost>
Mon problème, c'est que les 3 virtualhost fonctionnent correctement ..... mais pas le virtual par défaut !!!!!
Par contre, si je retire le VirtualHost de phpmyadmin, le VH par défaut fonctionne nickel.
Mais le problème ne viens pas de phpmyadmin car si je retire les VH elekaj stable et dev, les VH par défaut et phpmyadmin fonctionnent au poil.
J'ai tenté d'ajouté des directives "Directory", mais sans effets.
J'avoue ne pas trop comprendre le problème. Une idée ?
Cordialement,
Dernière modification par elekaj34 (Le 23/11/2007, à 09:31)
Alain - Linux Ubuntu 18.04 LTS 64bits
Lumières d'Ici ... et d'Ailleurs
Hors ligne
#2 Le 22/11/2007, à 19:10
- dexinou
Re : [resolu] Problème suite à l'installation d'un VirtualHost
supprime ceci NameVirtualHost *
il ne faut qu'UNE seule directive "NameVirtualHost" pour tous tes vhosts.
Dernière modification par dexinou (Le 22/11/2007, à 19:12)
Ubuntu 9.10 64bits ext4 ® Core 2 Duo
Unix..... il y a moins bien mais c'est plus cher.
Si t'as pas compris la réponse, pose mieux ta question.
Tutoriaux Linux, apache, pure-ftpd, bind, mysql, qmail...
Hors ligne
#3 Le 23/11/2007, à 09:30
- elekaj34
Re : [resolu] Problème suite à l'installation d'un VirtualHost
supprime ceci NameVirtualHost *
il ne faut qu'UNE seule directive "NameVirtualHost" pour tous tes vhosts.
Alors là j'ai honte ....
Bon finalement, j'ai supprimé le NameVirtualHost 127.0.0.1 et adapté les autres directives VirtualHost en conséquence.
Tout fonctionne au poil.
Cordialement,
Alain - Linux Ubuntu 18.04 LTS 64bits
Lumières d'Ici ... et d'Ailleurs
Hors ligne