Apache Server configuration support - virtualhost of virtualhost

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > December 2007 > virtualhost of virtualhost





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author virtualhost of virtualhost
cmk128@hotmail.com

2007-12-29, 1:31 pm

Hi
I have two server and one ip only. I have two websites, one server
for each.
If i set the proxypass from server A (hosting the first site) to
server B (hosting the second site). In server B apache, i cannot use
virtual host, because i pass the connection from server A to server B
like this:

<VirtualHost b.com>
ProxyPass / http://192.168.0.2
</VirtualHost>

!!! I used the IP to pass the webstie B connection, so in server B, i
cannot setup virtualhost from website B. So how to fix it?

thanks
from Peter (cmk128@hotmail.com)
Davide Bianchi

2007-12-30, 1:44 am

On 2007-12-29, cmk128@hotmail.com <cmk128@hotmail.com> wrote:
> I have two server and one ip only. I have two websites, one server
> for each.
> If i set the proxypass from server A (hosting the first site) to
> server B (hosting the second site). In server B apache, i cannot use
> virtual host, because i pass the connection from server A to server B
> like this:
>
><VirtualHost b.com>
> ProxyPass / http://192.168.0.2
></VirtualHost>


Yes, and that's the wrong way to do it, how about using different
NAMES instead of IPs? Or use different 'directories' to identify the
various websites? Or why not put both sites on the same machine and
have the vhosts defined on that?
There are many solutions, but is unclear what your problem is.

Davide

--
Every time I think that perhaps we are an advanced race, I turn around and
read ramblings on Slashdot, and realize I was wrong.
-- From a Slashdot.org post
Aaron Gray

2007-12-30, 1:29 pm

<cmk128@hotmail.com> wrote in message
news:e27bfaa5-8ca0-45a2-9635-b57ad362df6a@s12g2000prg.googlegroups.com...
> Hi
> I have two server and one ip only. I have two websites, one server
> for each.
> If i set the proxypass from server A (hosting the first site) to
> server B (hosting the second site). In server B apache, i cannot use
> virtual host, because i pass the connection from server A to server B
> like this:
>
> <VirtualHost b.com>
> ProxyPass / http://192.168.0.2
> </VirtualHost>
>
> !!! I used the IP to pass the webstie B connection, so in server B, i
> cannot setup virtualhost from website B. So how to fix it?


What a waste of power.

<VirtualHost *:80>
ServerName a.com
ServerAlias www.a.com
DocumentRoot /var/www/a.com/html
<Directory "/var/www/a.com">
allow from all
Options +Indexes
AllowOverride All
</Direcotory>
<VirtualHost>

<VirtualHost *:80>
ServerName b.com
ServerAlias www.b.com
DocumentRoot /var/www/b.com/html
<Directory "/var/www/b.com">
allow from all
Options +Indexes
AllowOverride All
</Direcotory>
<VirtualHost>

Try reading up on VirtualHost in Apache documentation.

Aaron


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com