Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 15330 invoked from network); 3 May 2006 14:43:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 May 2006 14:43:27 -0000 Received: (qmail 81187 invoked by uid 500); 3 May 2006 14:42:58 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 81132 invoked by uid 500); 3 May 2006 14:42:57 -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 81120 invoked by uid 99); 3 May 2006 14:42:57 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 May 2006 07:42:57 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [195.188.213.5] (HELO smtp-out2.blueyonder.co.uk) (195.188.213.5) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 May 2006 07:42:55 -0700 Received: from [172.23.170.139] (helo=anti-virus01-10) by smtp-out2.blueyonder.co.uk with smtp (Exim 4.52) id 1FbIYj-0001OL-Oc for users@httpd.apache.org; Wed, 03 May 2006 15:42:33 +0100 Received: from 82-34-18-2.cable.ubr03.basi.blueyonder.co.uk ([82.34.18.2] helo=[127.0.0.1]) by asmtp-out3.blueyonder.co.uk with esmtp (Exim 4.52) id 1FbIYj-0001yz-2G for users@httpd.apache.org; Wed, 03 May 2006 15:42:33 +0100 Message-ID: <4458C158.5050307@turrisi.co.uk> Date: Wed, 03 May 2006 15:42:32 +0100 From: Tom Turrisi User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: users@httpd.apache.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Subject: [users@httpd] mod_cgi & mod_rewrite issues X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, I'm running a 1.3 server which uses VirtualDocumentRoot for mass configured virtual hosting. It also uses mod_cgi to execute php. I want to make a php script available to the virtual hosts but i do not want the site owners to be able to get hold of the source code for it. I planned to get around this by putting the script in a directory below the level of ftp access that the site owners are chrooted to which is the public_html folder. I have created the rewrite rule and that seems to be fine if calling static content but it breaks when you try to run a php script. The only information in the error logs is "Premature end of script headers: /execscriptdir/php.cgi" The problem only occurs when trying to execute scripts in a folder somewhere below the public_html folder. I hope someone can throw some light on this. Google has not come up with anything that's helped me. Thanks Tom Here is the relevant parts of httpd.conf ServerType standalone ServerRoot / LoadModule ssl_module lib/apache/libssl.so LoadModule vhost_alias_module lib/apache/mod_vhost_alias.so LoadModule env_module lib/apache/mod_env.so LoadModule config_log_module lib/apache/mod_log_config.so LoadModule mime_module lib/apache/mod_mime.so LoadModule includes_module lib/apache/mod_include.so LoadModule autoindex_module lib/apache/mod_autoindex.so LoadModule dir_module lib/apache/mod_dir.so LoadModule cgi_module lib/apache/mod_cgi.so LoadModule asis_module lib/apache/mod_asis.so LoadModule action_module lib/apache/mod_actions.so LoadModule rewrite_module lib/apache/mod_rewrite.so LoadModule alias_module lib/apache/mod_alias.so LoadModule access_module lib/apache/mod_access.so LoadModule auth_module lib/apache/mod_auth.so LoadModule setenvif_module lib/apache/mod_setenvif.so ClearModuleList AddModule mod_vhost_alias.c AddModule mod_env.c AddModule mod_log_config.c AddModule mod_mime.c AddModule mod_include.c AddModule mod_autoindex.c AddModule mod_dir.c AddModule mod_cgi.c AddModule mod_asis.c AddModule mod_actions.c AddModule mod_rewrite.c AddModule mod_alias.c AddModule mod_access.c AddModule mod_auth.c AddModule mod_so.c AddModule mod_setenvif.c AddModule mod_ssl.c DocumentRoot "/home" Options FollowSymLinks AllowOverride None AllowOverride All Options IncludesNoExec ExecCGI AllowOverride All Options IncludesNoExec ExecCGI AllowOverride All Options IncludesNoExec ExecCGI AllowOverride All Options IncludesNoExec ExecCGI AllowOverride All Options IncludesNoExec ExecCGI AllowOverride All Options IncludesNoExec ExecCGI AddHandler cgi-script .exe RLimitCPU 40 40 AllowOverride All Options IncludesNoExec ExecCGI AllowOverride All Options IncludesNoExec ExecCGI AllowOverride All Options IncludesNoExec ExecCGI TypesConfig /etc/mime.types ScriptAlias /execscriptdir/ "/execscriptdir/" AddHandler cgi-script .cgi .pl AddHandler php .php .php3 .php4 Action php /execscriptdir/php.cgi AddHandler php5 .php5 Action php5 /execscriptdir/php5.cgi ServerName removed ErrorLog /var/log/error_log CustomLog /var/log/sites_access_log ald VirtualDocumentRoot /domains/%1.1/%1.2/%0/public_html RewriteEngine On RewriteMap lowercase int:tolower RewriteCond ${lowercase:%{SERVER_NAME}} ^(www\.)?(.)(.)(.*) RewriteRule ^/dshop/(.*) /domains/%2/%3/%2%3%4/shop/$1 User nobody Group sites --------------------------------------------------------------------- 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