Hello,
I don't know how to get my CGI PHP with mod_rewrite. When I try ordinary HTML everything works, but php ends with 500 Internal Server Error.
Code:
ScriptAlias /fcgi-bin/ /data/domains/example.com/www/cgi-bin/
AddHandler php-cgi .php
Action php-cgi /fcgi-bin/php
#
#mod_rewrite
RewriteEngine on
RewriteRule page\.php /index.php
mod_rewrite debug:
Code:
[rid#9296100/initial] (2) init rewrite engine with requested uri /page.php
[rid#9296100/initial] (3) applying pattern 'page\.php' to uri '/page.php'
[rid#9296100/initial] (2) rewrite '/page.php' -> '/index.php'
[rid#9296100/initial] (2) local path result: /index.php
[rid#9296100/initial] (2) prefixed with document_root to /data/domains/example.com/www/index.php
[rid#9296100/initial] (1) go-ahead with /data/domains/example.com/www/index.php [OK]
[rid#929a2e8/initial/redir#1] (2) init rewrite engine with requested uri /fcgi-bin/php/page.php
[rid#929a2e8/initial/redir#1] (3) applying pattern 'page\.php' to uri '/fcgi-bin/php/page.php'
[rid#929a2e8/initial/redir#1] (2) rewrite '/fcgi-bin/php/page.php' -> '/index.php'
[rid#929a2e8/initial/redir#1] (2) local path result: /index.php
[rid#929a2e8/initial/redir#1] (2) prefixed with document_root to /data/domains/example.com/www/index.php
[rid#929a2e8/initial/redir#1] (1) go-ahead with /data/domains/example.com/www/index.php [OK]
[rid#9296100/initial] (2) init rewrite engine with requested uri /
[rid#9296100/initial] (3) applying pattern 'page\.php' to uri '/'
[rid#9296100/initial] (1) pass through /
[rid#929a170/subreq] (2) init rewrite engine with requested uri /index.html
[rid#929a170/subreq] (3) applying pattern 'page\.php' to uri '/index.html'
[rid#929a170/subreq] (1) pass through /index.html
[rid#929a170/subreq] (2) init rewrite engine with requested uri /index.php
[rid#929a170/subreq] (3) applying pattern 'page\.php' to uri '/index.php'
[rid#929a170/subreq] (1) pass through /index.php
[rid#929c138/initial/redir#1] (2) init rewrite engine with requested uri /fcgi-bin/php/index.php
[rid#929c138/initial/redir#1] (3) applying pattern 'page\.php' to uri '/fcgi-bin/php/index.php'
[rid#929c138/initial/redir#1] (1) pass through /fcgi-bin/php/index.php
[rid#92aa1a0/subreq] (2) init rewrite engine with requested uri /index.php
[rid#92aa1a0/subreq] (3) applying pattern 'page\.php' to uri '/index.php'
[rid#92aa1a0/subreq] (1) pass through /index.php
apache error_log:
Code:
[error] FastCGI: comm with (dynamic) server "/data/domains/example.com/www/index.php" aborted: (first read) idle timeout (60 sec)
[error] FastCGI: incomplete headers (0 bytes) received from server "/data/domains/example.com/www/index.php"
|