Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 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

share|improve this answer

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

url.redirect = ( "^/path/to/info.cgi$" => "http://domain.com/path/to/info.php" )
share|improve this answer
    
Thank you for responding. I tried: url.redirect = ( "^/srv/www/info.cgi$" => "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 –  user93437 Sep 1 '11 at 17:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.