Return-Path: Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 67844 invoked by uid 500); 31 Jan 2003 01:14:23 -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: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 67823 invoked from network); 31 Jan 2003 01:14:22 -0000 Received: from unknown (HELO squarehosting.com) (12.158.191.98) by daedalus.apache.org with SMTP; 31 Jan 2003 01:14:22 -0000 Received: from mars.uni ([12.158.191.98]) by squarehosting.com (8.11.6/8.11.6) with SMTP id h0V1Cb430340 for ; Thu, 30 Jan 2003 20:12:37 -0500 Date: Thu, 30 Jan 2003 20:27:09 -0500 From: Jurgen To: users@httpd.apache.org Message-Id: <20030130202709.53012a00.apache@squarehosting.com> In-Reply-To: <017901c2c8bc$a37054d0$0101a8c0@tigana> References: <017901c2c8bc$a37054d0$0101a8c0@tigana> X-Mailer: Sylpheed version 0.7.0 (GTK+ 1.2.10; i586-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Subject: Re: [users@httpd] apache2 virtual hosting with Rewrite and Fastcgi Hi, I don't know anything about a buggy mod_rewrite, but if you rewrite /php-cgi/ then the script alias won't work anymore. So you should exclude /php-cgi/ and enter another RewriteCond like RewriteCond %{REQUEST_URI} !^/php-cgi/ I guess it would be also a bit more elegant to skip the other 2 RewriteCond, because they are not really RewriteCond's, because they match everything Instead you could use RewriteRule ^/(.*)$ ${vhost:${lowercase:%{SERVER_NAME}}}/www/$1 Jurgen On Fri, 31 Jan 2003 01:06:43 +0100 "Heimdall" wrote: > Hi there, > > First I would like to thanks apache and fastcgi teams. The php processing > speed > is damn fine with apache2.0.44 and php-4.2.3 :-). > > Now I'm trying a more complex configuration with apache2.0.44 (and now > php-4.3.0) > because I would like to implement virtual hosting. I have choose the > mod_rewrite and the "separate virtual host configuration file" hint from the > apache > mod_rewrite doc, which is easy to maintain. > (i.e. : maping virtual host to a local directory. Example map file > /etc/apache/vmap : > www.toto.com /var/hosting/www.toto.com/ > www.titi.com /var/hosting/www.titi.com/ > www.tata.com /var/hosting/www.tata.com/ > and then web pages are under each /www.) > > In my httpd.conf I add the following lines for the mass hosting > (it works well for static content) : > > RewriteEngine on > RewriteMap lowercase int:tolower > RewriteMap vhost txt:/etc/apache/vmap > RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$ > RewriteCond ${vhost:%1} ^(/.*)$ > RewriteRule ^/(.*)$ %1/www/$1 > > Here is the part about fastcgi who was working fine without mod_rewrite > (the fastcgi-compiled php bin is under /usr/sbin/) > > ScriptAlias /php-cgi/ "/usr/sbin/" > FastCgiIpcDir /var/apache/fastcgi > FastCgiServer /usr/sbin/php -processes 2 > AddType application/x-httpd-fastphp .php .php3 .php4 > Action application/x-httpd-fastphp /php-cgi/php > > But both config doesn't work together because mod_rewrite is executed after > aliases or something and .php files are then not found, as if the > ScriptAlias was > ignored. (i.e. : http://www.toto.com/info.php gives : > init rewrite engine with requested uri /info.php > rewrite /info.php -> /var/hosting/www.toto.com/www/info.php > local path result: /var/hosting/www.toto.com/www/info.php > go-ahead with /var/hosting/www.toto.com/www/info.php [OK] > init rewrite engine with requested uri /php-cgi/php/info.php > rewrite /php-cgi/php/info.php -> > /var/hosting/www.toto.com/www/php-cgi/php/info.php > local path result: /var/hosting/www.toto.com/www/php-cgi/php/info.php > go-ahead with /var/hosting/www.toto.com/www/php-cgi/php/info.php [OK] ) > > After some hours tweaking both mods, I'm lost... I can't make Rewrite or > Fastcgi processing php files through this config ... > > If someone has an idea about that please help :-) > Thx a lot > > -- > Heimdall > > > > --------------------------------------------------------------------- > 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 --------------------------------------------------------------------- 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