[users@httpd] Ubuntu 14 mod_proxy_hcheck

2017-01-05 Thread Orly Frank
Hi guys
I configure load balancer based on mod_proxy_balancer
I want to add active health check with status page for my backend servers
I found the module mod_proxy_hcheck but could not install it or enable it
>From the documentation, it looks like the module is available in Apache
2.4.21 and later but I could not find a way to enable it
Can anyone share instructions?
Thanks
Orly


-- 


Orly Frank / R&D
o...@zuznow.com

Zuznow
28 Rotschild Street
Tel-Aviv 6688205
www.zuznow.com

[image: Twitter]   [image: Facebook]
 [image: LinkedIn]
 [image: Youtube]



Re: [users@httpd] Web sockets & proxypass - No protocol handler was valid for the URL

2017-01-05 Thread Yann Ylavic
On Wed, Dec 28, 2016 at 3:53 PM, Eric Covener  wrote:
> On Tue, Dec 27, 2016 at 8:39 AM, Adam Teale  wrote:
>> Hi!
>>
>> I've been trying to setup a reverse proxy to a localhost websocket url.
>>
>> ProxyPass /chat/stream/ wss://localhost:8000/chat/stream/
>> ProxyPassReverse /chat/stream/ wss://localhost:8000/chat/stream/
>>
>> I get an error in the apache error_log that reads:
>>
>> No protocol handler was valid for the URL /chat/stream/. If you are using a
>> DSO version of mod_proxy, make sure the proxy submodules are included in the
>> configuration using LoadModule.
>>
>> I have read a lot of pages via google of people using this method so I
>> wonder if there is some issue in our setup/install of Apache that ships with
>> Mac OS X 10.11 & Server.app 5.2?
>>
>> I have all the standard modules loaded in httpd_server_app.conf
>>
>> LoadModule proxy_module libexec/apache2/mod_proxy.so
>> LoadModule proxy_http_module libexec/apache2/mod_proxy_http.so
>> LoadModule proxy_wstunnel_module libexec/apache2/mod_proxy_wstunnel.so
>>
>> When I access the application running on localhost:8000 directly on the
>> server everything works fine
>>
>> Any ideas what could be going on?
>
> There is a bug in this area, but you need to decide what you expect to
> happen with non-websockets requests to /chat/stream/ which is what's
> happening here.
>
> If you intend to proxy it, you might need to change the LoadModule
> order of mod_proxy_http and mod_proxy_wstunnel to try to get a
> different order at runtime.
>
> If you expect to satisfy it somehow else... you have a bit of a
> puzzler.  I'm not sure there's a good recipe for this.  Otherwise as
> Yann said, you should use different URLs if you can.

For the record (after private discussion with Adam), it seems that a
configuration like the below would work for http(s) and ws(s) on the
same URL:

  RewriteEngine on
  RewriteCond %{HTTP:Upgrade} "(?i)websocket"
  RewriteRule ^/(.*)$ wss://backend/$1 [P]
  ProxyPass / https://backend/

Actually it didn't work for him because of other app issues (Upgrade
missing), but httpd behaved correctly with this.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Web sockets & proxypass - No protocol handler was valid for the URL

2017-01-05 Thread Yann Ylavic
On Thu, Jan 5, 2017 at 10:36 AM, Yann Ylavic  wrote:
>
> For the record (after private discussion with Adam), it seems that a
> configuration like the below would work for http(s) and ws(s) on the
> same URL:
>
>   RewriteEngine on
>   RewriteCond %{HTTP:Upgrade} "(?i)websocket"
>   RewriteRule ^/(.*)$ wss://backend/$1 [P]
>   ProxyPass / https://backend/

*But* note that having both HTTP(s) and WS(s) on the same URL it is
*not* recommended, mainly for security reasons.

While mod_proxy_http is a strict HTTP protocol validator,
mod_proxy_wstunnel is only a tunnel (a TCP proxy) once the upgrade is
asked by the client/browser).

So with the above configuration a simple Upgrade header in the request
would open a tunnel with backend, including for "normal" HTTP traffic.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Web sockets & proxypass - No protocol handler was valid for the URL

2017-01-05 Thread Adam Teale
Hi Yann thanks again for all your help.

I am still trying to work out why the client isn't receiving the Upgrade
header in the response.
I see a proxy debug log:

[Thu Jan 05 11:04:24.002173 2017] [proxy:debug] [pid 65956]
proxy_util.c(3754): (54)Connection reset by peer: [client 127.0.0.1:51776]
AH03308: ap_proxy_transfer_between_connections: error on sock -
ap_get_brigade

[Thu Jan 05 11:04:24.002356 2017] [proxy:debug] [pid 65956]
proxy_util.c(2169): AH00943: WS: has released connection for (alfred.local)

[Thu Jan 05 11:04:28.001195 2017] [proxy:debug] [pid 65946]
proxy_util.c(3754): (54)Connection reset by peer: [client 127.0.0.1:51780]
AH03308: ap_proxy_transfer_between_connections: error on sock -
ap_get_brigade

[Thu Jan 05 11:04:28.001369 2017] [proxy:debug] [pid 65946]
proxy_util.c(2169): AH00943: WS: has released connection for (alfred.local)

Any idea what that might be about and if it is related?


2017-01-05 6:55 GMT-03:00 Yann Ylavic :

> On Thu, Jan 5, 2017 at 10:36 AM, Yann Ylavic  wrote:
> >
> > For the record (after private discussion with Adam), it seems that a
> > configuration like the below would work for http(s) and ws(s) on the
> > same URL:
> >
> >   RewriteEngine on
> >   RewriteCond %{HTTP:Upgrade} "(?i)websocket"
> >   RewriteRule ^/(.*)$ wss://backend/$1 [P]
> >   ProxyPass / https://backend/
>
> *But* note that having both HTTP(s) and WS(s) on the same URL it is
> *not* recommended, mainly for security reasons.
>
> While mod_proxy_http is a strict HTTP protocol validator,
> mod_proxy_wstunnel is only a tunnel (a TCP proxy) once the upgrade is
> asked by the client/browser).
>
> So with the above configuration a simple Upgrade header in the request
> would open a tunnel with backend, including for "normal" HTTP traffic.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


[users@httpd] How to modify the apache instance name in linux

2017-01-05 Thread Muduli, Chittaranjan

Hi,

Any one knows how to modify the installation path in apache http in lunix.

i.e. to change the installation path from  /var/http/abc to /var/http/domain1web

Diligenta Limited (Company No. 5535029) is a subsidiary of Tata Consultancy 
Services Limited.  Diligenta Limited is registered in England and Wales, has 
its registered office at Lynch Wood, Peterborough, PE2 6FY and is authorised 
and regulated by the Financial Conduct Authority.

The information in this e-mail is confidential and may be legally privileged. 
It is intended solely for the intended recipient and access to this e-mail by 
anyone else is unauthorised. If you have received this message in error, please 
notify us and remove it from your system. Although this message and any 
attachments are believed to be free of any virus (or other defect) that might 
affect any computer system into which it is received and opened, it is the 
responsibility of the recipient to ensure that it is virus free. No 
responsibility is accepted by Diligenta Limited or Tata Consultancy Services 
Limited for any loss or damage in any way arising from its use. Any views or 
opinions presented are solely those of the author and do not necessarily 
represent those of Diligenta Limited. Replies to this e-mail may be monitored 
for operational or business reasons.


Re: [users@httpd] How to modify the apache instance name in linux

2017-01-05 Thread Spork Schivago
Hello Muduli,

I'm assuming you're talking about Apache 2.4, but it shouldn't really
matter I'd think.

If I understand your question correctly, the default installation directory
for Apache is /usr/local/apache2.Is that what you want to change?   If
so, you can change that using configure and passing the --prefix=option
to it, like so:
./configure --prefix=/var/http/domain1.web

I'm thinking this might not be what you're talking about though, because
you use /var/http/abc as an example, not /usr/local/apache2.

Here's a list of the various configuration options.   Maybe there's
something there that will help you:
https://httpd.apache.org/docs/current/programs/configure.html

Thanks!

On Thu, Jan 5, 2017 at 10:47 AM, Muduli, Chittaranjan <
chittaranjan.mud...@diligenta.co.uk> wrote:

> Hi,
>
>
>
> Any one knows how to modify the installation path in apache http in lunix.
>
>
>
> i.e. to change the installation path from  /var/http/abc to
> /var/http/domain1web
>
> Diligenta Limited (Company No. 5535029) is a subsidiary of Tata Consultancy 
> Services Limited.  Diligenta Limited is registered in England and Wales, has 
> its registered office at Lynch Wood, Peterborough, PE2 6FY and is authorised 
> and regulated by the Financial Conduct Authority.
>
> The information in this e-mail is confidential and may be legally privileged. 
> It is intended solely for the intended recipient and access to this e-mail by 
> anyone else is unauthorised. If you have received this message in error, 
> please notify us and remove it from your system. Although this message and 
> any attachments are believed to be free of any virus (or other defect) that 
> might affect any computer system into which it is received and opened, it is 
> the responsibility of the recipient to ensure that it is virus free. No 
> responsibility is accepted by Diligenta Limited or Tata Consultancy Services 
> Limited for any loss or damage in any way arising from its use. Any views or 
> opinions presented are solely those of the author and do not necessarily 
> represent those of Diligenta Limited. Replies to this e-mail may be monitored 
> for operational or business reasons.
>
>