Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

OK, what finally worked for me was:



added ".cgi" in

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

added line: = ( ".cgi" => ".php" )  


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$" => "" )
share|improve this answer
Thank you for responding. I tried: url.redirect = ( "^/srv/www/info.cgi$" => ""; ) 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


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.