lighttpd pagina padrao

lighttpd pagina padrao

To enable php on lighttpd, is very simple.

The facility is geared to ubuntu -. , but in other distributions, is basically the same thing

We use the fastcgi- for this connection between the two. Remembering that php has to be CGI.

If you have not yet installed lighttpd can follow a tutorial I did on this installation here .

Knowing more lighttpd

Assuming that you already have lighttpd installed and running, as well as php-cgi, let’s continue. Lighttpd has two commands for installing modules, which greatly facilitate the life of anyone, they are the lighttpd-enable-mod and lighttpd-disable-mod , respectively, to enable and disable modules.

To find out which modules are available for activation with the command just type the command, you will have the list of possibilities.

vinicius @ Absinthe: ~ $ lighty-enable-mod
Available modules: auth accesslog cgi fastcgi evasive evhost expire FLV streaming on-www proxy rrdtool simple-vhost ssi ssl status userdir usertrack fastcgi-php debian-doc
Already enabled modules: simple-vhost fastcgi fastcgi-php

Enable module: 

Installing the module in lighttpd

After entering the command, you simply enter the module to which you want to install.

Or in our case, as we have already sure that we will install, just enter the following command in the terminal.

fastcgi lighty-enable-mod
lighty-enable-mod fastcgi-php

Remember to do this as root , but will not do anything.

Finally, reload the settings of lighttpd, so they take effect

/etc/init.d/lighttpd reload


service lighttpd reload

To test create a simple php in the server folder, commonly /var/www with the code:

echo "" > /var/www/info.php

And go http://localhost/info.php

If you have any questions, or anger, or just want to scold me for lack of what to do, contact. Until next time!

Written by vinicius