Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 66154 invoked from network); 28 Aug 2010 10:27:58 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 28 Aug 2010 10:27:58 -0000 Received: (qmail 41499 invoked by uid 500); 28 Aug 2010 10:27:54 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 41371 invoked by uid 500); 28 Aug 2010 10:27:52 -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 41363 invoked by uid 99); 28 Aug 2010 10:27:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Aug 2010 10:27:51 +0000 X-ASF-Spam-Status: No, hits=4.7 required=10.0 tests=FREEMAIL_FROM,FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of icicimov@gmail.com designates 209.85.212.45 as permitted sender) Received: from [209.85.212.45] (HELO mail-vw0-f45.google.com) (209.85.212.45) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Aug 2010 10:27:44 +0000 Received: by vws19 with SMTP id 19so4729993vws.18 for ; Sat, 28 Aug 2010 03:27:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:received :in-reply-to:references:date:message-id:subject:from:to:content-type; bh=P6QH4EMSz3k9OnwudK+LJywrUj6MjXI9BdNyVjdmsQU=; b=VaNG1wUuBuZ89EUjC6ERPe8ucB4KbTH1Ww6GWtsNvGyABSbHKTf5eXEXTvgnvo5Fa3 UWkF/U6TtqsFMVALGRHtRudjo5Nkoss54Z0tYEdwLHepuY9xW4nR5F2NO1zkJm3CVGwl V2wMLbtEieUeq8/xFy6wMA93mM8Vy9dG8YTsw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=uKYoQMDDill2CYF0JE1UgztQIlomBbeELYXWYVALEUW1smJZsuaL5O3kDhLoyU5yKo QWaABNi3FOLSCUdxxocrLgnk8NR3ne+Unv3XbkLPycyNxMRYUOvFqsUwyfzVjCa8FyMG /HNlzjjaGlOY0X63AE+k5gwDTOEK3ARJ1wASA= MIME-Version: 1.0 Received: by 10.220.125.23 with SMTP id w23mr1256721vcr.136.1282991242288; Sat, 28 Aug 2010 03:27:22 -0700 (PDT) Received: by 10.220.49.77 with HTTP; Sat, 28 Aug 2010 03:27:22 -0700 (PDT) Received: by 10.220.49.77 with HTTP; Sat, 28 Aug 2010 03:27:22 -0700 (PDT) In-Reply-To: <29559444.post@talk.nabble.com> References: <29559444.post@talk.nabble.com> Date: Sat, 28 Aug 2010 20:27:22 +1000 Message-ID: From: Igor Cicimov To: users@httpd.apache.org Content-Type: multipart/alternative; boundary=001636d344b13f227b048edfad7d X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] mod_rewrite problem with mod_fcgid --001636d344b13f227b048edfad7d Content-Type: text/plain; charset=ISO-8859-1 And whats wrong with the rule? Looks to me that your php script is not right. Sent from my phone On Aug 28, 2010 7:50 PM, "Umar" wrote: Dear User, Recently i have configured mod_fcgid + php + apache on FreeBSD everything is working fine. But my mod_rewrite rul is not working. Here is my virtualhost setting ServerAdmin unix.co@gmail.com DocumentRoot "/usr/local/www/mydata" ServerName unix.expample.org ErrorLog "/var/log/apache/unix-error_log" CustomLog "/var/log/apache/unix-access_log" common Action php-fcgi /fcgi-bin/php-fcgi-wrapper Alias /fcgi-bin/ /usr/local/www/apache22/php5-default/ RewriteEngine on RewriteLog "/var/log/apache/rewrite.log" RewriteLogLevel 3 RewriteCond %{QUERY_STRING} ^q=(.*)$ RewriteRule /.*-channel-(\d+) /search_jobs.php?q=%1 [L] Here is to output of rewrite logs 202.142.167.93 - - [28/Aug/2010:09:45:29 +0500] [unix.example.org/sid#28951018][rid#28996058/initial] (2) init rewrite engine with requested uri /abc-channel-202 202.142.167.93 - - [28/Aug/2010:09:45:29 +0500] [unix.example.org/sid#28951018][rid#28996058/initial] (3) applying pattern '/.*-channel-(\d+)' to uri '/abc-channel-202' 202.142.167.93 - - [28/Aug/2010:09:45:29 +0500] [unix.example.org/sid#28951018][rid#28996058/initial] (2) rewrite '/abc-channel-202' -> '/search_jobs.php?q=abcd' 202.142.167.93 - - [28/Aug/2010:09:45:29 +0500] [unix.example.org/sid#28951018][rid#28996058/initial] (3) split uri=/search_jobs.php?q=abcd -> uri=/search_jobs.php, args=q=abcd 202.142.167.93 - - [28/Aug/2010:09:45:29 +0500] [unix.example.org/sid#28951018][rid#28996058/initial] (2) local path result: /search_jobs.php 202.142.167.93 - - [28/Aug/2010:09:45:29 +0500] [unix.example.org/sid#28951018][rid#28996058/initial] (2) prefixed with document_root to /usr/local/www/mydata/search_jobs.php 202.142.167.93 - - [28/Aug/2010:09:45:29 +0500] [unix.example.org/sid#28951018][rid#28996058/initial] (1) go-ahead with /usr/local/www/mydata/search_jobs.php [OK] Here is the logs of virtualhost [Sat Aug 28 09:42:17 2010] [warn] [client 202.142.167.93] (53)Software caused connection abort: mod_fcgid: error reading data from FastCGI server [Sat Aug 28 09:42:17 2010] [error] [client 202.142.167.93] Premature end of script headers: search_jobs.php Would you please help how i can solve this issue. regards, Umar -- View this message in context: http://old.nabble.com/mod_rewrite-problem-with-mod_fcgid-tp29559444p29559444.html Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org --001636d344b13f227b048edfad7d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

And whats wrong with the rule? Looks to me that your php script is not r= ight.

Sent from my phone

On Aug 28, 2010 7:50 PM, "Umar" <= unix.co@gmail.c= om> wrote:


Dear User,

Recently i have configured mod_fcgid + php + apache on FreeBSD everything i= s
working fine. But my mod_rewrite rul is not working.

Here is my virtualhost setting

<VirtualHost *:80>
=A0 =A0ServerAdmin unix.co@gmail.com
=A0 =A0DocumentRoot "/usr/local/www/mydata"
=A0 =A0ServerName u= nix.expample.org
=A0 =A0ErrorLog "/var/log/apache/unix-error_log"
=A0 =A0CustomLog "/var/log/apache/unix-access_log" common
=A0 =A0Action php-fcgi /fcgi-bin/php-fcgi-wrapper
=A0 =A0Alias /fcgi-bin/ /usr/local/www/apache22/php5-default/

=A0 =A0RewriteEngine on
=A0 =A0RewriteLog "/var/log/apache/rewrite.log"
=A0 =A0RewriteLogLevel 3
=A0 =A0RewriteCond %{QUERY_STRING} ^q=3D(.*)$
=A0 =A0RewriteRule /.*-channel-(\d+) /search_jobs.php?q=3D%1 [L]

</VirtualHost>

Here is to output of rewrite logs
202.142.167.93 - - [28/Aug/2010:09:45:29 +0500]
[unix.example.org/sid#28951018][rid#28996058/initial] (2)= init rewrite
engine with requested uri /abc-channel-202
202.142.167.93 - - [28/Aug/2010:09:45:29 +0500]
[unix.example.org/sid#28951018][rid#28996058/initial] (3)= applying pattern
'/.*-channel-(\d+)' to uri '/abc-channel-202'
202.142.167.93 - - [28/Aug/2010:09:45:29 +0500]
[unix.example.org/sid#28951018][rid#28996058/initial] (2)= rewrite
'/abc-channel-202' -> '/search_jobs.php?q=3Dabcd'
202.142.167.93 - - [28/Aug/2010:09:45:29 +0500]
[unix.example.org/sid#28951018][rid#28996058/initial] (3)= split
uri=3D/search_jobs.php?q=3Dabcd -> uri=3D/search_jobs.php, args=3Dq=3Dab= cd
202.142.167.93 - - [28/Aug/2010:09:45:29 +0500]
[unix.example.org/sid#28951018][rid#28996058/initial] (2)= local path result:
/search_jobs.php
202.142.167.93 - - [28/Aug/2010:09:45:29 +0500]
[unix.example.org/sid#28951018][rid#28996058/initial] (2)= prefixed with
document_root to /usr/local/www/mydata/search_jobs.php
202.142.167.93 - - [28/Aug/2010:09:45:29 +0500]
[unix.example.org/sid#28951018][rid#28996058/initial] (1)= go-ahead with
/usr/local/www/mydata/search_jobs.php [OK]


Here is the logs of virtualhost

[Sat Aug 28 09:42:17 2010] [warn] [client 202.142.167.93] (53)Software
caused connection abort: mod_fcgid: error reading data from FastCGI server<= br> [Sat Aug 28 09:42:17 2010] [error] [client 202.142.167.93] Premature end of=
script headers: search_jobs.php


Would you please help how i can solve this issue.


regards,

Umar

--
View this message in context: http://o= ld.nabble.com/mod_rewrite-problem-with-mod_fcgid-tp29559444p29559444.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com= .


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.<= br> See <URL:
http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
=A0 " =A0 from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

--001636d344b13f227b048edfad7d--