Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D28BE200B32 for ; Thu, 9 Jun 2016 06:44:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D10AD160A35; Thu, 9 Jun 2016 04:44:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id F19D5160A2E for ; Thu, 9 Jun 2016 06:44:04 +0200 (CEST) Received: (qmail 98209 invoked by uid 500); 9 Jun 2016 04:44:03 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 98198 invoked by uid 99); 9 Jun 2016 04:44:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Jun 2016 04:44:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 7082CC1531 for ; Thu, 9 Jun 2016 04:44:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id mkgYJlQ-HNvK for ; Thu, 9 Jun 2016 04:44:00 +0000 (UTC) Received: from mail-oi0-f45.google.com (mail-oi0-f45.google.com [209.85.218.45]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 4B7685F642 for ; Thu, 9 Jun 2016 04:43:59 +0000 (UTC) Received: by mail-oi0-f45.google.com with SMTP id e72so45977069oib.1 for ; Wed, 08 Jun 2016 21:43:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=uwEXtbl7p60mWQ7qgoYYwzNjOpqaRytXbWuko1kK4dg=; b=mzxEVwsbufxCEjDN823ZeWoM0b4CYqyz3417mocX4nT0P5meyCBsils62+wOp+Hp10 PxytEU3BoSEksKibcRi6JKsvgzAuNlGY3RSIUgKh7wxGM0xPnA1Q8arVTAqTU5LAsQqq gvHsx3EaesgJ3lZSAxO5PMNC71iumLtN2QMaAwIASWWQGmC2OkPeTSDcG+Vtcl7wa282 hsohR3IKsebq487gqag+Cle6h2I702ydMYpj+Q0OwFlx41stCftzq2eC+v2GVX9UPCQ4 oUjywfd66e/JYvUwrkXDfk5oOOvpiVGoN5Aa0Jy3v9EW+ju1IZTQgmtjSYgOKKz+0lka ggnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=uwEXtbl7p60mWQ7qgoYYwzNjOpqaRytXbWuko1kK4dg=; b=ZKaVBHLWx+fQiCilVrUyR7mGUYDR8IqGzwvK/4wZXacNMtBSwpJqJ2HLQMslfRLy3A AwIykjMEi+Ck1uFTP50s+ZRuWIfpTcdCiyWOm2nAanbuKtqZewXjmtdNeVm8ppL0gIAL aYrJJ5vF0IKWswk3kvz3aYh9PqpRwNTXT07fJv/uuBHsvDHvjNFuKIBx1PQQ4BgBpO0O uf9hTmjut6Fo/eBmmeoPrnEVW+ctePvf5f5PIvg8GXRYJVUeKleKRwLUT1LDbtF9XM5P Toh5bJgmMgJuQ8hQzdeM0Q6n/88+qUv2QdbAaniQMXk+UX3P/OKDRZsLHzLZnCU8Qq8R z96g== X-Gm-Message-State: ALyK8tKlwahlZU5Ly/NXuR3NWcAhPbd70m00PvvamnX7xp3GARfYNFedtcjf1ATKfX0RqBrFIK5dlEKL5pPDWg== X-Received: by 10.202.94.132 with SMTP id s126mr4777564oib.34.1465447438180; Wed, 08 Jun 2016 21:43:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.202.48.69 with HTTP; Wed, 8 Jun 2016 21:43:57 -0700 (PDT) In-Reply-To: References: From: "linux.il" Date: Thu, 9 Jun 2016 07:43:57 +0300 Message-ID: To: users@httpd.apache.org Content-Type: multipart/alternative; boundary=001a113d5160fd68890534d1113c Subject: Re: [users@httpd] Is there a way to return non-200 status when HHVM backend is down? archived-at: Thu, 09 Jun 2016 04:44:06 -0000 --001a113d5160fd68890534d1113c Content-Type: text/plain; charset=UTF-8 On Wed, Jun 8, 2016 at 3:35 PM, Yehuda Katz wrote: > If you use mod_rewrite instead of ProxyPass, you can specify it should > only proxy for files that don't exist. This is an example from the > documentation: > > RewriteCond "%{REQUEST_FILENAME}" !-f > RewriteCond "%{REQUEST_FILENAME}" !-d > RewriteRule "^/(.*)" "http://old.example.com/$1" [P] > > - Y > > Sent from a device with a very small keyboard and hyperactive autocorrect. > On Jun 8, 2016 4:13 AM, "linux.il" wrote: > >> Hi, >> I'm running Apache 2.4 with HHVM backend (.php processing is going to >> HHVM on :9000 with >> ProxyPassMatch directive). >> From time to time HHVM service is freezing, so PHP stuff return 503, but >> static pages work as usual. I'd like Apache to return 503 or any non-200 >> status for static pages in this situation. How this can be done? >> >> TIA, >> Vitaly >> > Yehuda, thank you, but I'm not sure I understand how it will help. My goal is to return 503 status to *all* http requests when HHVM is down. (why? - I'm using Incapsula loadbalancing; and Incapsula is using live traffic for decide if server up/down. So my server stays "up" in Incasula when HHVM down) --001a113d5160fd68890534d1113c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Wed, Jun 8, 2016 at 3:35 PM, Yehuda Katz <yehuda@ymkatz.net>= wrote:

If you use = mod_rewrite instead of ProxyPass, you can specify it should only proxy for = files that don't exist. This is an example from the documentation:

RewriteCond "%{REQUEST_FILENAME}" !-f
RewriteCond "%{REQUEST_FILENAME}" !-d
RewriteRule "^/(.*)" "http://old.example.com/$1" [P]

- Y

Sent from a device with a very small keyboard and hyperactiv= e autocorrect.

On Jun 8, 2016 4:13 AM, "linux.il" <linux.il@gmail.com> wrote:
=
Hi,
I'm running Apache 2.4 with HHVM backend (.php processing i= s going to HHVM on :9000 with
ProxyPassMatch directive).
From t= ime to time HHVM=C2=A0 service is freezing, so PHP stuff return 503, but st= atic pages work as usual. I'd like Apache to return 503 or any non-200 = status for static pages=C2=A0 in this situation. How this can be done?
<= br>
TIA,
Vitaly

Yehuda,=
thank you, but I'm not sure I unde= rstand how it will help.
My goal is to = return 503 status to *all* http requests when HHVM is down.
(why? - I'm using Incapsula loadbalancing; and Inc= apsula is using live traffic for decide if server up/down. So my server sta= ys "up" in Incasula when HHVM down)
--001a113d5160fd68890534d1113c--