On 20 nov, 13:43, Le Souricier Gris <lesouricierg... RemoveThis @gmail.com> wrote:
> Hello everybody,
>
> I want to create some virtual hosts on my web server so I add theses
> lines to my httpd.conf :
>
> NameVirtualHost 192.168.1.1
>
> <VirtualHost intranet.mycompany.com>
> ServerAdmin m... RemoveThis @mycompany.com
> DocumentRoot /var/www/html
> ServerName intranet.mycompany.com
> ErrorLog logs/intranet-error_log
> </VirtualHost>
>
> <VirtualHost toto.mycompagny.com>
> ServerAdmin m... RemoveThis @mycompany.com
> DocumentRoot /var/www/toto
> ServerName toto.mycompagny.com
> ErrorLog logs/toto-error_log
> </VirtualHost>
>
> <VirtualHost other.mycompagny.com>
> ServerAdmin m... RemoveThis @mycompany.com
> DocumentRoot /var/www/other
> ServerName other.mycompagny.com
> ErrorLog logs/scalpel-error_log
> </VirtualHost>
>
> When I Open my Internet Navigator onhttp://intranet.mycompany.com,
> I've got the web site toto.mycompagny.com !!!
>
> When I Open my Internet Navigator onhttp://other.mycompany.com,
> That's ok
>
> When I Open my Internet Navigator onhttp://toto.mycompany.com, That's
> ok
>
> I don't undestand !
>
> Thanks for you help.
Ok I find my mistake
http://httpd.apache.org/docs/2.0/vhosts/examples.html
J'ai trouvé en effet j'avais vraiment mal écrit, httpd -S m'a bien
aidé et j'ai utilisé le lien HTML dans le fichier de conf de Apache
(RTFM je me l'applique) :
#
# Use name-based virtual hosting.
#
NameVirtualHost *
#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
<VirtualHost *>
ServerAdmin eric.berthomier RemoveThis @justice.fr
DocumentRoot /var/www/html
ServerName intranet.macompagnie.com
ErrorLog logs/intranet-error_log
</VirtualHost>
<VirtualHost *>
ServerAdmin eric.berthomier RemoveThis @justice.fr
DocumentRoot /var/www/scalpel
ServerName scalpel.macompagnie.com
ErrorLog logs/scalpel-error_log
</VirtualHost>
<VirtualHost *>
ServerAdmin eric.berthomier RemoveThis @justice.fr
DocumentRoot /var/www/webstat
ServerName webstat.macompagnie.com
ErrorLog logs/webstat-error_log
</VirtualHost>