My goal is to install a working web server, for local and packaged (RPM) applications, I will use phpMyAdmin as an example.

1. Installation :

yum --enablerepo=remi install php-fpm phpMyAdmin lighttpd-fastcgi

This command will also install the apache web server, listening on port 80. I will not use it, but I will configure lighttpd to listen on port 81.

2. Creating my web site

With lighttpd, pages are, by default, installed in the /var/www/lighttpd directory.

My application will be very minimal:

echo '<?php phpinfo(); ?>' >/var/www/lighttpd/lhinfo.php

3. Lighttp configuration

I'm really not an expert on this web server, but, reading the documentation (quite good), I found a working solution:

Edit the /etc/lighttpd/lighttpd.conf  configuration file:

Port (uncomment and change the line) :

server.port = 81

Activation of the needed modules  (uncomment the lines) :

"mod_alias",
"mod_fastcgi",

Fastcgi  module configuration (add the lines)

fastcgi.server = ( ".php" =>
((
"host" => "127.0.0.1",
"port" => 9000
))
)

Alias for phpMyAdmin configuration, create the /etc/lighttpd/conf.d/phpMyAdmin.conf file:

    alias.url += ( "/phpMyAdmin" => "/usr/share/phpMyAdmin/" )

4. Launch the services

service php-fpm start
service lighttpd start

5. URL de test

6. Conclusion

It works !