You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jason Lile <ja...@acanthurus.com> on 2002/05/03 19:10:43 UTC
virtual hosts question
i'll try to make this simple while including all the necessary info...
i'm using version 1.3.22 of apache for our company's webserver. the company,
www.company.com is the "main_server" and there are no vhosts currently in use.
i'd like to set some up for personal webspace. we do not have enough IP
addresses to use for "play" purposes, so these must be name-based vhosts.
currently the main server obviously serves all hits and it is important that the
config stay this way (to the best of my knowledge) as we are using SSL and a VPN
connection so the IP of the main server is VERY important. i have read all the
docs on the vhosts and tried several configs... problem is, anytime i get a
vhost container to work, it serves ALL the hits to the server. i can't get
multiple domain names to work w/o setting up multiple containers... which
includes one for the main server which i do NOT want to do at this point. i am
not currently using any "listen" or "bind" ports/addresses. i'm guessing at
this point that i'm going to have to listed on another port to serve as the IP
address/port combination for a vhost, but i can't afford to play around a lot
with the config as our website is obviously "mission critical" to the business.
so, i'm asking for help here instead of disabling the website everytime i try a
new config for a minute or so ;) thanks in advance.
jason
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: virtual hosts question
Posted by Jason Lile <ja...@acanthurus.com>.
> You MUST have a <virtualhost> container for each host that will be served
> by a name virtual host configuration.
i was afraid of that...
> But this should not scare you at
> all. Consider the following:
>
> NameVirtualHost *
>
> <VirtualHost *>
> Servername same.as.main.host
> DocumentRoot /same/as/main/host
> </VirtualHost>
>
> <VirtualHost *>
> Servername other
> DocumentRoot /other
> </VirtualHost>
>
> etc...
>
> Now all the settings from the main host will be inherited by that first
> virtual host, so it should behave exactly as it did before.
in theory, yes, but we all know how that works sometimes ;) the other domains
are not really important, more for fun and my learning/practice with all of
this. problem is if i break stuff, i currently have to pay someone else to fix
it as i'm relatively new to all of this anyway and the IPSec stuff we have in
place is way over my head... if it breaks, i won't know if it was something i
did or something else. i can always do it this way and change it back if i have
problems i suppose.
> The only other way to do this is to assign one extra IP address to the
> machine and have all the name virtual hosts live on that extra IP address.
> Then you use
>
> NameVirtualHost extra.ip.address
> <VirtualHost extra.ip.address>
> ...
> </VirtualHost>
> ...
now this does sound like a pretty good idea! we've only got a couple extra IP
addresses, but this could make pretty good use of one of them. thanks for the
suggestion!
jason
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: virtual hosts question
Posted by Joshua Slive <jo...@slive.ca>.
On Fri, 3 May 2002, Jason Lile wrote:
> currently the main server obviously serves all hits and it is important that the
> config stay this way (to the best of my knowledge) as we are using SSL and a VPN
> connection so the IP of the main server is VERY important. i have read all the
> docs on the vhosts and tried several configs... problem is, anytime i get a
> vhost container to work, it serves ALL the hits to the server. i can't get
> multiple domain names to work w/o setting up multiple containers... which
> includes one for the main server which i do NOT want to do at this point. i am
You MUST have a <virtualhost> container for each host that will be served
by a name virtual host configuration. But this should not scare you at
all. Consider the following:
NameVirtualHost *
<VirtualHost *>
Servername same.as.main.host
DocumentRoot /same/as/main/host
</VirtualHost>
<VirtualHost *>
Servername other
DocumentRoot /other
</VirtualHost>
etc...
Now all the settings from the main host will be inherited by that first
virtual host, so it should behave exactly as it did before.
The only other way to do this is to assign one extra IP address to the
machine and have all the name virtual hosts live on that extra IP address.
Then you use
NameVirtualHost extra.ip.address
<VirtualHost extra.ip.address>
...
</VirtualHost>
...
Joshua.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org