virtualhost with ip

This is a discussion on virtualhost with ip within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi i have a domain, i want to setup a virtual to separate the domain name and ip. when the ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-22-2008
cmk128@hotmail.com
 
Posts: n/a
Default virtualhost with ip

Hi
i have a domain, i want to setup a virtual to separate the domain
name and ip. when the user enter my domain name, it goes to a website,
if he enter the server ip, it will go to another website.

I tried to set the IP as the ServerName, but doesn't work

<VirtualHost *>
ServerName 1.2.3.4
</VirtualHost>

Please help
thanks
from Peter (cmk128@hotmail.com)
  #2 (permalink)  
Old 04-22-2008
D. Stussy
 
Posts: n/a
Default Re: virtualhost with ip

<cmk128@hotmail.com> wrote in message
news:ae52f64d-b397-43a1-93b9-49798e69fc73@w4g2000prd.googlegroups.com...
> Hi
> i have a domain, i want to setup a virtual to separate the domain
> name and ip. when the user enter my domain name, it goes to a website,
> if he enter the server ip, it will go to another website.
>
> I tried to set the IP as the ServerName, but doesn't work
>
> <VirtualHost *>
> ServerName 1.2.3.4
> </VirtualHost>


When one has multiple NAMED virtual hosts sharing an IP address, anything
for that IP address that doesn't match any of the server names or aliases is
routed to the first instance defined in the configuration file.

You also need this statement:

NameVirtualHost *


  #3 (permalink)  
Old 04-22-2008
Mark Taylor
 
Posts: n/a
Default Re: virtualhost with ip

"D. Stussy" <spam@bde-arc.ampr.org> wrote in
news:fuk0bu$65i$1@snarked.org:

> <cmk128@hotmail.com> wrote in message
> news:ae52f64d-b397-43a1-93b9-49798e69fc73@w4g2000prd.googlegroups.com..
> .
>> Hi
>> i have a domain, i want to setup a virtual to separate the domain
>> name and ip. when the user enter my domain name, it goes to a
>> website, if he enter the server ip, it will go to another website.
>>
>> I tried to set the IP as the ServerName, but doesn't work
>>
>> <VirtualHost *>
>> ServerName 1.2.3.4
>> </VirtualHost>

>
> When one has multiple NAMED virtual hosts sharing an IP address,
> anything for that IP address that doesn't match any of the server
> names or aliases is routed to the first instance defined in the
> configuration file.
>
> You also need this statement:
>
> NameVirtualHost *
>
>
>


In other words....

Put the Vhost entry you have above at the top of your present Named
Virtual Hosts. And include the rest of the required container elements.




----== Posted via Pronews.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.pronews.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= - Total Privacy via Encryption =---
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:31 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0