introduction screenshots faq forum blog modules components download
Please use the search function and/or read the FAQ first.

Go to Topic: PreviousNext
Go to: Message ListNew TopicSearchLog InPrint View

VirtualHost??



Posted by: oliviertsf
August 14, 2008 06:42PM
Bonjour tout le monde,

J'ai un soucis avec les <virtualhost>
Sur mon serveur j'ai voulu mettre 2 sites à l'aide du virtual host d'apache

Configuration de
C:\Program Files\EasyPHP 2.0b1\apache\conf\extra\httpd-vhosts.conf

=====================================
NameVirtualHost x.x.x.x
<VirtualHost *:80>
DocumentRoot E:/_www/site1
ServerName site1
ServerAlias www.site1
<Directory "E:/_www/site1">
Options FollowSymLinks Indexes
AllowOverride None
Order deny,allow
Allow from all
deny from all
</Directory>
ErrorLog E:/_www/logs/site1_error
</VirtualHost>
<VirtualHost *:80>
DocumentRoot E:/_www/site2
ServerName site2
ServerAlias www.site2
<Directory "E:/_www/site2">
Options FollowSymLinks Indexes
AllowOverride None
Order deny,allow
Allow from all
deny from all
</Directory>
ErrorLog E:/_www/logs/site2_error
</VirtualHost>
=====================================
Résultat des courses, quelques soit l'adresse site1 ou site2, je tombe automatiquement sur le site déclaré en premier, dans le cas présent toujours sur le site site1


Avez-vous une idée?
Merci d'avance pour votre aide

##################
English Version:
##################

Hello everyone,
I have a concern with the <virtualhost>
On my waiter I wanted to put 2 sites using the virtual host of apache
Configuration of
C:\Program Files\EasyPHP 2.0b1\apache\conf\extra\httpd-vhosts.conf
=====================================
NameVirtualHost x.x.x.x
<VirtualHost *:80>
DocumentRoot E:/_www/site1
ServerName site1
ServerAlias www.site1
<Directory "E:/_www/site1">
Options FollowSymLinks Indexes
AllowOverride None
Order deny,allow
Allow from all
deny from all
</Directory>
ErrorLog E:/_www/logs/site1_error
</VirtualHost>
<VirtualHost *:80>
DocumentRoot E:/_www/site2
ServerName site2
ServerAlias www.site2
<Directory "E:/_www/site2">
Options FollowSymLinks Indexes
AllowOverride None
Order deny,allow
Allow from all
deny from all
</Directory>
ErrorLog E:/_www/logs/site2_error
</VirtualHost>
=====================================
Result,
some is the address site1 or site2, I fall automatically on the site declares in first, in this case always on the site site1

Do you have an idea?
Thanks for all your help



Edited 3 time(s). Last edit at 08/14/2008 06:45PM by oliviertsf.
Options: ReplyQuote
Posted by: oliviertsf
August 14, 2008 07:04PM
PS:
Je viens de tester avec <VirtualHost site1:80> et <VirtualHost site2:80>
Même résultat

C'est comme s'il ne prenait pas en compte le fait qu'il y ait plusieurs virtual host et qu'il prend le premier qu'il trouve.
Options: ReplyQuote
Posted by: Amour
August 14, 2008 09:32PM
Vous avez bien mis "NameVirtualHost *" ?
Et les domaines en questions existent ?
Avez-vous tenté sans le ServerAlias ?
Options: ReplyQuote
Posted by: oliviertsf
August 15, 2008 06:20PM
Bonjour,

j'ai déja NameVirtualHost * dans le fichier, j'ai oublié de le rajouter dans le post.
Les 2 domaines existe deja. Au départ je n'avais pas les alias, et 'javais le meme problème.
Options: ReplyQuote
Posted by: oliviertsf
August 15, 2008 06:22PM
J'ai contourné le problème temporairement en mettant le site sur un autre hébergeur, en attendant de trouver la solution.
Options: ReplyQuote
Posted by: Amour
August 15, 2008 08:41PM
Quoi qu'il en soit il ne faut pas héberger avec EasyPHP, pas fait pour ;)
Options: ReplyQuote
Posted by: mega-squall
August 18, 2008 02:34PM
Il faut impérativement que le paramètre de NameVirtualHost est celui de tes VirtualHost soit le même.
Il faut en outre préciser le port d'utilisation.
Je te conseille, comme le manuel d'Apache le préconise, d'utiliser *:80 partout.

Cela est documenté dans le manuel d'Apache ici : [httpd.apache.org]
Voir la section "Fonctionnement de plusieurs serveurs virtuels par nom sur une seule adresse IP"

---
mega-squall
Options: ReplyQuote


Go to: Message ListSearchLog In
Your Name: 
Your Email: 
Subject: 
Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.