You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by th...@bnpparibas.com on 2002/07/22 15:18:32 UTC

Simple VirtualHost configuration problem ?

I'm trying to setup 2 virtual hosts : one for prod and one for test on the
same domain on the same box on the same IP

I can't change the DNS configuration (only my ISP can), so I decide to run
the virtual host for the test server on a different port like this :

Listen 80
Listen 8080

<VirtualHost www.my-dom.com>
  DocumentRoot /www/prod
  ServerName  www.my-dom.com
</VirtualHost>

<VirtualHost www.my-dom.com:8080>
  DocumentRoot /www/test
  ServerName  www.my-dom.com:8080
</VirtualHost>

"telnet www.my-dom.com 8080" gives me no anwser

Thanks for help





This message and any attachments (the "message") is
intended solely for the addressees and is confidential. 
If you receive this message in error, please delete it and 
immediately notify the sender. Any use not in accord with 
its purpose, any dissemination or disclosure, either whole 
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message. 
BNP PARIBAS (and its subsidiaries) shall (will) not 
therefore be liable for the message if modified. 

                ---------------------------------------------

Ce message et toutes les pieces jointes (ci-apres le 
"message") sont etablis a l'intention exclusive de ses 
destinataires et sont confidentiels. Si vous recevez ce 
message par erreur, merci de le detruire et d'en avertir 
immediatement l'expediteur. Toute utilisation de ce 
message non conforme a sa destination, toute diffusion 
ou toute publication, totale ou partielle, est interdite, sauf 
autorisation expresse. L'internet ne permettant pas 
d'assurer l'integrite de ce message, BNP PARIBAS (et ses
filiales) decline(nt) toute responsabilite au titre de ce 
message, dans l'hypothese ou il aurait ete modifie.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Simple VirtualHost configuration problem ?

Posted by Dmitry Medvedev <me...@rsdsoft.msk.ru>.
try to use IP addresses instead of real names. <VirtualHost
www.my-dom.com> -> <VirtualHost IP1:80> & <VirtualHost IP1:8080>. Comment
out the ServerName  directive

----- Original Message -----
From: <th...@bnpparibas.com>
To: <us...@httpd.apache.org>
Sent: Monday, July 22, 2002 5:18 PM
Subject: Simple VirtualHost configuration problem ?


>
> I'm trying to setup 2 virtual hosts : one for prod and one for test on the
> same domain on the same box on the same IP
>
> I can't change the DNS configuration (only my ISP can), so I decide to run
> the virtual host for the test server on a different port like this :
>
> Listen 80
> Listen 8080
>
> <VirtualHost www.my-dom.com>
>   DocumentRoot /www/prod
>   ServerName  www.my-dom.com
> </VirtualHost>
>
> <VirtualHost www.my-dom.com:8080>
>   DocumentRoot /www/test
>   ServerName  www.my-dom.com:8080
> </VirtualHost>
>
> "telnet www.my-dom.com 8080" gives me no anwser
>
> Thanks for help
>
>
>
>
>
> This message and any attachments (the "message") is
> intended solely for the addressees and is confidential.
> If you receive this message in error, please delete it and
> immediately notify the sender. Any use not in accord with
> its purpose, any dissemination or disclosure, either whole
> or partial, is prohibited except formal approval. The internet
> can not guarantee the integrity of this message.
> BNP PARIBAS (and its subsidiaries) shall (will) not
> therefore be liable for the message if modified.
>
>                 ---------------------------------------------
>
> Ce message et toutes les pieces jointes (ci-apres le
> "message") sont etablis a l'intention exclusive de ses
> destinataires et sont confidentiels. Si vous recevez ce
> message par erreur, merci de le detruire et d'en avertir
> immediatement l'expediteur. Toute utilisation de ce
> message non conforme a sa destination, toute diffusion
> ou toute publication, totale ou partielle, est interdite, sauf
> autorisation expresse. L'internet ne permettant pas
> d'assurer l'integrite de ce message, BNP PARIBAS (et ses
> filiales) decline(nt) toute responsabilite au titre de ce
> message, dans l'hypothese ou il aurait ete modifie.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Simple VirtualHost configuration problem ?

Posted by Jay States <js...@mac.com>.
You must name the virtual ip address in the httpd.conf file:

NameVirtualHost 192.0.0.1:80
NameVirtualhost 192.0.0.1:8080

<VirtualHost 192.0.0.1:80>
Document
ServerName www.sample.com
</VirtualHost>

<VirtualHost 192.0.0.1:8080>
Document
ServerName www.sample.com
</VirtualHost>


Just replace your ip address with the sample one I used.

J


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org