Welcome to MobyThreads.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

Virtual Host access via IP address and domain name

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Related Topics:
One Virtual Host listening on several Domain names? - Hi, I would like to configure our Apache to respond to several domains (i.e. which are all pointing to one IP, on which the Apache is The Apache is setup up with several Virtual Hosts,..

Virtual Domain and host info in http request - As you know, if you had seen my previous pleas for help regarding virtual hosts, I cannot get virtual hosts to work at all. From what I (I am learning far more than I ever wanted to know about this, please forgive my the way..

Help - apache don't use right domain name form mail sender.. - Hello, My linux machine have two domain names: 1. a bogus domain name: and 2. a real domain name: I created zone files for both of the domains, and they both have entries in so they all work well. My..

Possible to specify access to site by ip address? - Im running apache with multiple sites I have one website which is currently a 'work in progress' and i only want to allow access to it only by ip address so I can just allow 2 or three people to look at it. Is it possible to edit the below..

what is my domain/server address for apache on a standalon.. - hello there, setting up things so to run the cold fusion server from my own machine for testing . So wandering what the domain and server names would be for the apache set up??? thanks santhi
Next:  Apache: Apache mod rewrite rule question  
Author Message
petebud

External


Since: Jan 06, 2005
Posts: 1



(Msg. 1) Posted: Thu Jan 06, 2005 2:14 pm
Post subject: Virtual Host access via IP address and domain name
Archived from groups: alt>apache>configuration (more info?)

Red Hat 9 - Apache 2

I once had my apache working in the following manner.

I could enter my IP address (say 222.222.222.1)and it would take me to
the documents i had under USER1
I could also enter my 2nd IP address (say 222.222.222.2) and it would
take me to the documents i had under USER2
I could enter my domain name www.company1.com and it would take me to
the documents i had for company1
I could enter my domain name www.company2.com and it would take me to
the documents i had for company2

But now only my domain names work, if i try to start apache with an IP
address in the ServerName Directive it fails.

Here is the VirtualHost section as it was before it stopped working:

NameVirtualHost *

<VirtualHost *>
ServerAdmin me.RemoveThis@me.com
DocumentRoot /www/docs/user1
ServerName 222.222.222.1
</VirtualHost>

<VirtualHost *>
ServerAdmin me.RemoveThis@me.com
DocumentRoot /www/docs/user2
ServerName 222.222.222.2
</VirtualHost>

<VirtualHost *>
ServerAdmin me.RemoveThis@me.com
DocumentRoot /www/docs/company1
ServerName www.company1.com
</VirtualHost>

<VirtualHost *>
ServerAdmin me.RemoveThis@me.com
DocumentRoot /www/docs/company2
ServerName www.company2.com
</VirtualHost>

Is this still possible? Was it a fluke that i had it working the 1st
time?

Thanks
Pete
petebud.RemoveThis@yahoo.com

 >> Stay informed about: Virtual Host access via IP address and domain name 
Back to top
Login to vote
hans1

External


Since: Mar 29, 2004
Posts: 672



(Msg. 2) Posted: Thu Jan 06, 2005 9:35 pm
Post subject: Re: Virtual Host access via IP address and domain name [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"petebud" <petebud.TakeThisOut@yahoo.com> schreef in bericht
news:1105049674.089207.292320@f14g2000cwb.googlegroups.com...
 > I could enter my IP address (say 222.222.222.1)and it would take me to
 > the documents i had under USER1
 > I could also enter my 2nd IP address (say 222.222.222.2) and it would
 > take me to the documents i had under USER2
 > I could enter my domain name <a style='text-decoration: underline;' href="http://www.company1.com" target="_blank">www.company1.com</a> and it would take me to
 > the documents i had for company1
 > I could enter my domain name <a style='text-decoration: underline;' href="http://www.company2.com" target="_blank">www.company2.com</a> and it would take me to
 > the documents i had for company2
 >
 > But now only my domain names work, if i try to start apache with an IP
 > address in the ServerName Directive it fails.
 >
 > Here is the VirtualHost section as it was before it stopped working:
 >
 > NameVirtualHost *
 >
 > <VirtualHost *>
 > ServerAdmin me.TakeThisOut@me.com
 > DocumentRoot /www/docs/user1
 > ServerName 222.222.222.1
 > </VirtualHost>
In this context the 222.222.222.1 is NOT an IPaddres...

Apparently you had 4 names in your DNS, 2 having the looks and feels of an
IPadres -add this _/awfull/_ pair to yout /etc/hosts file-

HansH!<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Virtual Host access via IP address and domain name 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting and Web Master Forums (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 ]