I'm getting the following error...
No input file specified.
...in response to the following URL:
http://173.45.226.110/main/Home
The target file certainly exists and is working:
http://173.45.226.110/php/main.php?page=Home
This seems to be a problem with the mod_rewrite package. Here is the apache configuration file:
FastCgiServer /home/www/mygarble.com/1.8.0/public_http/php-fastcgi
NameVirtualHost 173.45.226.110:80
<VirtualHost 173.45.226.110:80>
ServerName www.mygarble.com
ServerAdmin someone@somewhere.else
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log combined
ServerSignature Off
LogLevel warn
DocumentRoot /home/www/mygarble.com/1.8.0/public_http/
<Directory /home/www/mygarble.com/1.8.0/public_http/>
Order allow,deny
allow from all
</Directory>
<Directory /home/www/mygarble.com/1.8.0/public_http/php>
AddHandler php-fastcgi .php
Action php-fastcgi /php-fastcgi
</Directory>
RewriteEngine on
RewriteLog /var/log/apache2/rewrite.log
RewriteLogLevel 9
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule /hello$ /home/www/mygarble.com/1.8.0/public_http/php/helloworld.php [L]
</VirtualHost>
This configuration worked absolutely fine on the previous version of Ubuntu. I've just upgraded from Lucid to Natty, and now this problem has surfaced.
Thanks for any help!
Update: The rewrite log is returning the following:
initial] (2) init rewrite engine with requested uri /hello
initial] (3) applying pattern '/hello$' to uri '/hello'
initial] (4) RewriteCond: input='' pattern='^$' => matched
initial] (2) rewrite '/hello' -> '/home/www/mygarble.com/1.8.0/public_http/php/helloworld.php'
initial] (2) local path result: /home/www/mygarble.com/1.8.0/public_http/php/helloworld.php
initial] (1) go-ahead with /home/www/mygarble.com/1.8.0/public_http/php/helloworld.php [OK]
initial/redir#1] (2) init rewrite engine with requested uri /php-fastcgi/hello
initial/redir#1] (3) applying pattern '/hello$' to uri '/php-fastcgi/hello'
initial/redir#1] (4) RewriteCond: input='200' pattern='^$' => not-matched
initial/redir#1] (1) pass through /php-fastcgi/hello
subreq] (2) init rewrite engine with requested uri /hello
subreq] (3) applying pattern '/hello$' to uri '/hello'
subreq] (4) RewriteCond: input='200' pattern='^$' => not-matched
subreq] (1) pass through /hello
The first match seems to work, but then /php-fastcgi/hello is being matched. Is this where the problem lies?
^– Tim Jan 17 at 15:37RewriteEngine on RewriteCond %{ENV:REDIRECT_STATUS} ^$ RewriteRule /hello$ /php/helloworld.php [L]you can now see this yourself withhttp://173.45.226.110/hello– James Smith Jan 17 at 17:20RewriteBasedirective, and your Rewrite rules are defined outside of theDirectorydirectives. I believe apache and PHP cannot come up with the fully qualified path. TryRewriteBase /home/www/mygarble.com/1.8.0/public_http/, or change the Rewrite rule to cover the full path – Tim Jan 17 at 17:54