1

We have an older web-enabled device serving an info.cgi web page to a client device. We would like to have that same client device access a newer device without any changes, which runs lighttpd with php-cgi. The functionality is easily accessible on the new info.php web page in the same format.

A client-side JavaScript redirect does not do the trick.

I tried a symlink, but then the web server suggests to download the page.

I tried a few things in the lighttpd config file, with no luck.

A helpful hint would be greatly appreciated.

Wesley
  • 32,690
  • 9
  • 82
  • 117
quadmore
  • 11
  • 2

2 Answers2

2

OK, what finally worked for me was:

uncomment

 "mod_rewrite",

added ".cgi" in

static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".cgi" )  

added line:

fastcgi.map-extensions = ( ".cgi" => ".php" )  

after

fastcgi.server             = ( ".php" =>               
                               ( "localhost" =>
                                 (       
                                   "socket" => "/tmp/php-fastcgi.socket",
                                   "bin-path" => "/usr/sbin/php-cgi"
                                 )                                             
                               )                                     
                             )                            

and finally symlinked info.php to info.cgi

and rebooted.

And Bob's your uncle.

Hope this helps someone.

Cheers, Bert

quadmore
  • 21
  • 1
0

Would a 3xx redirect response work for those client systems?

url.redirect = ( "^/path/to/info.cgi$" => "http://domain.com/path/to/info.php" )
Shane Madden
  • 114,520
  • 13
  • 181
  • 251
  • Thank you for responding. I tried: url.redirect = ( "^/srv/www/info.cgi$" => "http://192.168.1.241/info.php" ) Got in the error log: 2011-09-01 13:51:19: (mod_redirect.c.125) pcre-compile failed for ^/srv/www/info.cgi$ When I do /usr/sbin/lighttpd -V I get "PCRE support" mentioned. In the config file, "mod_redirect" is uncommented. I'm wearing my clown nose. What am I doing wrong? Thanks in advance, Bert –  Sep 01 '11 at 17:57