Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Help on Virtual Host

 
   Web Hosting Problem Solving Community! (Home) -> Apache RSS
Next:  Problems with IIS 6.0  
Author Message
Le Souricier Gris

External


Since: Nov 20, 2007
Posts: 2



(Msg. 1) Posted: Tue Nov 20, 2007 4:43 am
Post subject: Help on Virtual Host
Archived from groups: alt>apache>configuration (more info?)

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 me.DeleteThis@mycompany.com
DocumentRoot /var/www/html
ServerName intranet.mycompany.com
ErrorLog logs/intranet-error_log
</VirtualHost>

<VirtualHost toto.mycompagny.com>
ServerAdmin me.DeleteThis@mycompany.com
DocumentRoot /var/www/toto
ServerName toto.mycompagny.com
ErrorLog logs/toto-error_log
</VirtualHost>

<VirtualHost other.mycompagny.com>
ServerAdmin me.DeleteThis@mycompany.com
DocumentRoot /var/www/other
ServerName other.mycompagny.com
ErrorLog logs/scalpel-error_log
</VirtualHost>


When I Open my Internet Navigator on http://intranet.mycompany.com,
I've got the web site toto.mycompagny.com !!!

When I Open my Internet Navigator on http://other.mycompany.com,
That's ok

When I Open my Internet Navigator on http://toto.mycompany.com, That's
ok

I don't undestand !

Thanks for you help.

 >> Stay informed about: Help on Virtual Host 
Back to top
Login to vote
Le Souricier Gris

External


Since: Nov 20, 2007
Posts: 2



(Msg. 2) Posted: Tue Nov 20, 2007 6:59 am
Post subject: Re: Help on Virtual Host [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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>

 >> Stay informed about: Help on Virtual Host 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting Problem Solving Community! (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]