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 67A5A200B6B for ; Thu, 25 Aug 2016 21:59:13 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 66409160AA5; Thu, 25 Aug 2016 19:59:13 +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 AB461160AA4 for ; Thu, 25 Aug 2016 21:59:12 +0200 (CEST) Received: (qmail 73060 invoked by uid 500); 25 Aug 2016 19:59:11 -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 73050 invoked by uid 99); 25 Aug 2016 19:59:11 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Aug 2016 19:59:11 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 95B4F180576 for ; Thu, 25 Aug 2016 19:59:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.061 X-Spam-Level: *** X-Spam-Status: No, score=3.061 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, 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, SPOOF_COM2COM=1.632] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id PBNlFEROxOCa for ; Thu, 25 Aug 2016 19:59:08 +0000 (UTC) Received: from mail-yb0-f179.google.com (mail-yb0-f179.google.com [209.85.213.179]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 255085F30C for ; Thu, 25 Aug 2016 19:59:08 +0000 (UTC) Received: by mail-yb0-f179.google.com with SMTP id d10so20246101ybi.1 for ; Thu, 25 Aug 2016 12:59:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=2SB6X+z31p+ITQVPmd8F3FG6cHvUJxsoi2z3DfTGuxY=; b=x1iM62RT1jZeUc4C/ANeSN4ELh78pQ6XIa9x3A21Q2wJe+I0rI2hBeXjwE0Xd44YT0 zF9um8KTn5RaZJh5WGnQN0XHNe6cUNq021S5qzRVJTqV9KoARN8dM/DmTphqBujaZCL1 DcVIzcYktOEsY0EcQOLsjeZ/ayqTlL/PApOe5uGueMTRx13EYBiNUFISqzN1XvJMpwSi XJoqr88LzyfGzOouM6LYu0mFj93qdX+MuvCPTzkIq76CihjrbcI5f2E61Rz4RZI71OSa G5jlazZpj/KRSFNk5Y+f3DyudznuxrmRcwqdt0T8/N1lBgCXcRb1uN3CzEUVDo8GFqrk mFOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=2SB6X+z31p+ITQVPmd8F3FG6cHvUJxsoi2z3DfTGuxY=; b=EYGT1mYQMf5IoiqnueLu011SpAWc+CmBVd1jkJEuZl7sPLngCx+wdNe1a7JtHJmQO8 M8R0luXWS+yPet6MfbLN/MuHQ7bfZzQBXY1/bLw0hSOYWYM6LVZpuQMLsKHE14kPBYjG s5QMzTNJitaAIzeOVGCHVfil7RvrlqH46GZomEOZ5AWLxhjp+GUNYR61aQDUscN9PFVf 2o1+f2MKgFr0Q1NPx3+Uu1Kp0DrRj4pBCpgWHh4okoJB46lKvBU9HXe/t43NekBgXhJ6 Rvv5Z/c+6ielwyKS0hmd0Mi/zWeefRm/y9Ibk9xqKSoxUKkPbzAFAD7L24KkxNYUwZrZ aVlA== X-Gm-Message-State: AEkoouuxrhOFVB0piaytygCunrMWqTJ7uVHjl5mSJVzcvSZar5JkeRZlHWfY3VLzIH9ngR9mo3wtDBZw93DT5A== X-Received: by 10.37.80.76 with SMTP id e73mr7979973ybb.35.1472155146700; Thu, 25 Aug 2016 12:59:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.215.21 with HTTP; Thu, 25 Aug 2016 12:59:06 -0700 (PDT) From: "Brian A. Davis" Date: Thu, 25 Aug 2016 15:59:06 -0400 Message-ID: To: users@httpd.apache.org Content-Type: multipart/alternative; boundary=001a113e9d3492cea1053aead4f3 Subject: [users@httpd] Regex fails to complie archived-at: Thu, 25 Aug 2016 19:59:13 -0000 --001a113e9d3492cea1053aead4f3 Content-Type: text/plain; charset=UTF-8 Hello, I'm trying to reject requests hitting my apache proxy which are NOT going to *.foo.com, *.foo.com:443 or *.foo.com/blahblahblah. I'm trying to avoid bogus requests like foo.com.baddomain.com. The regex I'm using is: \.foo.com(?:\:\d{2,5}|\/.*)?$ This is working exactly how I want on https://regex101.com/r/tE4pM2/1, but when I put this into my apache config: I get the following error: httpd[3704]: AH00526: Syntax error on line 179 of /etc/httpd/conf/httpd.conf: httpd[3704]: Cannot parse condition clause: Failed to compile regular expression Is apache limited in the regex support that it has? httpd -v Server version: Apache/2.4.6 (CentOS) Server built: Nov 19 2015 21:43:13 Thanks, Brian --001a113e9d3492cea1053aead4f3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello,

I'm trying to reject request= s hitting my apache proxy which are NOT going to *.foo.com, *.foo.com:443 or *.foo.com/blahblahblah. I'm trying= to avoid bogus requests like foo.= com.baddomain.com.

The regex I'm using is:=

\.foo.com(?:\:\d{2= ,5}|\/.*)?$

This is working exactly how I want= on=C2=A0https://regex101.com/r= /tE4pM2/1, but when I put this into my apache config:

<If "%{REQUEST_URI} =3D~ /\.foo.= com(?:\:\d{2,5}|\/.*)?$/">

I get t= he following error:

httpd[3704]: AH00526: Syntax e= rror on line 179 of /etc/httpd/conf/httpd.conf:
httpd[3704]: = Cannot parse condition clause: Failed to compile regular expression

Is apache limited in the regex support that it has?

httpd -v
Server version: Apache/2.4.= 6 (CentOS)
Server built: =C2=A0 Nov 19 2015 21:43:13
<= div>
Thanks,
Brian
--001a113e9d3492cea1053aead4f3--