You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Arno Schatz <ga...@gmx.net> on 2007/11/22 17:10:59 UTC

[users@httpd] Virtual Hosts and reverse proxy

Hi,

I am trying to set up virtual hosts for web applications running on the
intranet. (using httpd 2.2 on openSuse 10.3 amd64). The configuration is
below, problem is that all requests go to the first virtual host and
passed on to the first application. The second application is never been
called.
So http://second.mydomain.biz:80 will end up at
http://172.16.185.128:50000/ internally, which is not intended. I am new
to httpd. Am I missing something obvious? Or is there some other trick
to reserve proxying?

thanks,
   Arno


<VirtualHost *:80>
ProxyPass / http://172.16.185.128:50000/
ProxyPassReverse / http://172.16.185.128:50000/
ProxyPreserveHost On
<Proxy *>
allow from all
</Proxy>
ServerName first.mydomain.biz
</VirtualHost>


<VirtualHost *:80>
ProxyPass / http://192.168.59.129:8080/
ProxyPassReverse / http://192.168.59.129:8080/
ProxyPreserveHost On
<Proxy *>
allow from all
</Proxy>
ServerName second.mydomain.biz
</VirtualHost>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Virtual Hosts and reverse proxy

Posted by Krist van Besien <kr...@gmail.com>.
On Nov 22, 2007 5:10 PM, Arno Schatz <ga...@gmx.net> wrote:
> Hi,
>
> I am trying to set up virtual hosts for web applications running on the
> intranet. (using httpd 2.2 on openSuse 10.3 amd64). The configuration is
> below, problem is that all requests go to the first virtual host and
> passed on to the first application. The second application is never been
> called.
> So http://second.mydomain.biz:80 will end up at
> http://172.16.185.128:50000/ internally, which is not intended. I am new
> to httpd. Am I missing something obvious? Or is there some other trick
> to reserve proxying?

Do you have the following in your config?

NameVirtualHost *:80

If you don't have this, add this before your virtualhosts config, and
test again.

Krist


-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org