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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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) |
|
|||
|
<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 * |
|
|||
|
"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 | |
|
|