Return-Path: X-Original-To: apmail-httpd-users-archive@www.apache.org Delivered-To: apmail-httpd-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CBA9710F15 for ; Thu, 17 Apr 2014 21:20:32 +0000 (UTC) Received: (qmail 85968 invoked by uid 500); 17 Apr 2014 21:19:43 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 85942 invoked by uid 500); 17 Apr 2014 21:19:42 -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 85934 invoked by uid 99); 17 Apr 2014 21:19:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Apr 2014 21:19:42 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of glicerinu@gmail.com designates 209.85.128.181 as permitted sender) Received: from [209.85.128.181] (HELO mail-ve0-f181.google.com) (209.85.128.181) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Apr 2014 21:19:37 +0000 Received: by mail-ve0-f181.google.com with SMTP id oy12so1294031veb.26 for ; Thu, 17 Apr 2014 14:19:16 -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 :content-type; bh=szQ1Wet3sjJj4rXusNS5JEVvr4C8cjyrI1Y3J/auD/8=; b=jIZNa2V8tcYyJ48Y9ttMJaZ2crYOz1gxjssAMXL3uK/BsIyH79tw4Nbkg3LC7sfM41 lyqJAzhzafRgTMzaSuNJrnbyTMue2C84E8p86w+bobUgwootR16/6YtI8NjBtJfn2U1t PgUVeWtw31H27SKq8WZAB/7bjNNOqgdX18kWQymCL7MWoj/n1YAVpBFZ8RcRSf0+fqgU /PoyPNCK4OuPkAudpptoBQeBVjSFEhsYnL26TvjkC7PlPspuJHTtMsIYs+5dJ3c5D+/d 9pVazG7y2wuzSGPjv3LAqc8zaqTDOemYP+KPfrd+FApiqLhEd0Ae8gFCqNZREWuzrfcS XSUg== X-Received: by 10.220.12.66 with SMTP id w2mr9379353vcw.15.1397769556690; Thu, 17 Apr 2014 14:19:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.29.38 with HTTP; Thu, 17 Apr 2014 14:18:56 -0700 (PDT) In-Reply-To: References: From: Marc Aymerich Date: Thu, 17 Apr 2014 23:18:56 +0200 Message-ID: To: users@httpd.apache.org Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org Subject: [users@httpd] Re: ProxyPassMatch with Unix sockets On Wed, Apr 16, 2014 at 11:17 PM, Marc Aymerich wrote: > Hi, > I have a PHP-FPM web application that I want it to be accessed under > "/alias/" path. I'm trying to configure ProxyPassMatch with Unix > sockets but it doesn't work because it passes "/alias/" to the web > app, but this path doesn't exist :( > > What I have so far is this: > > ProxyPassMatch ^/alias/(.*\.php(/.*)?)$ \ > unix:/var/run/user-fpm.sock|fcgi://localhost/home/user/webapps/app1/ I think I got something :) if you guys like to comment on the following solution it would be great! (I'm kind of newbie) # Rewrite the URL before proxying RewriteRule ^/alias(.*\.php)$ $1 [L,PT] ProxyPassMatch ^/?(.*\.php)$ unix:/var/run/user.sock|fcgi://127.0.0.1/home/user/webapps/app1/ # Create an alias for app1 static content Alias /alias /home/user/webapps/app1/ -- Marc --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org