Mailing List Archive

Can set multiple VirtualHost and ProxyPass?
I want to use 2 ProxyPass by different port(80,440) in only 1 apache server.
Below config is able?

config e.g.)
<VirtualHost *:80>
ProxyPass / https://<A server<https://%3cA%20server> IP>/
ProxyPassReverse / https://<A server<https://%3cA%20server> IP>/
</VirtualHost>

<VirtualHost *:443>
ProxyPass / https://<B server<https://%3cB%20server> IP>:8443/
ProxyPassReverse / https://<B server<https://%3cB%20server> IP>:8443/
</VirtualHost>
Re: Can set multiple VirtualHost and ProxyPass? [ In reply to ]
Yes, you can, but I would question why you would want to proxy from the
port 80 vhost, and not from a TLS vhost, unless you don't intend to handle
the TLS handshake with httpd on the first leg.

Don't forget SSLProxyEngine on

On Tue, 23 Nov 2021 at 22:04, ???? / SATOU?MASAHIRO <
masahiro.satou.ey@hitachi-systems.com> wrote:

> I want to use 2 ProxyPass by different port(80,440) in only 1 apache
> server.
>
> Below config is able?
>
>
>
> config e.g.)
>
> <VirtualHost *:80>
>
> ProxyPass / https://<A server IP>/
>
> ProxyPassReverse / https://<A server IP>/
>
> </VirtualHost>
>
>
>
> <VirtualHost *:443>
>
> ProxyPass / https://<B server IP>:8443/
>
> ProxyPassReverse / https://<B server IP>:8443/
>
> </VirtualHost>
>
RE: Re: Can set multiple VirtualHost and ProxyPass? [ In reply to ]
Reason is client must only use 80,443 port.

So, I think must use <VirtualHost *:80> and <VirtualHost *:443>.

From: Frank Gingras <thumbs@apache.org>
Sent: Wednesday, November 24, 2021 12:24 PM
To: users@httpd.apache.org
Subject: [!]Re: [users@httpd] Can set multiple VirtualHost and ProxyPass?

Yes, you can, but I would question why you would want to proxy from the port 80 vhost, and not from a TLS vhost, unless you don't intend to handle the TLS handshake with httpd on the first leg.

Don't forget SSLProxyEngine on

On Tue, 23 Nov 2021 at 22:04, ???? / SATOU?MASAHIRO <masahiro.satou.ey@hitachi-systems.com<mailto:masahiro.satou.ey@hitachi-systems.com>> wrote:
I want to use 2 ProxyPass by different port(80,440) in only 1 apache server.
Below config is able?

config e.g.)
<VirtualHost *:80>
ProxyPass / https://<A server<https://%3cA%20server> IP>/
ProxyPassReverse / https://<A server<https://%3cA%20server> IP>/
</VirtualHost>

<VirtualHost *:443>
ProxyPass / https://<B server<https://%3cB%20server> IP>:8443/
ProxyPassReverse / https://<B server<https://%3cB%20server> IP>:8443/
</VirtualHost>