11
Jun

lighttpd

   Posted by: admin   in Mẹo vặt của hiếu râu

https://www.vultr.com/docs/how-to-install-lighttpd-llmp-stack-on-centos-6

Installing PHP

Install PHP using yum.

yum install lighttpd-fastcgi php-fpm

Configure PHP-FPM user settings.

vi /etc/php-fpm.d/www.conf

We must add the following lines to the either the top or bottom of the configuration:

user = lighttpd

group = lighttpd

Make PHP-FPM start on boot.

php-fpm on

Start PHP-FPM.

service php-fpm start

Configure php.ini.

vi /etc/php.ini

Remove the commenting on the following line.

cgi.fix_pathinfo=1

Tell Lighttpd that PHP exists on this server.

vi /etc/lighttpd/modules.conf

Add the following line.

include “conf.d/fastcgi.conf”

Now we must tell PHP to listen on port 9000 (Lighttpd will send PHP requests there). Using your favorite text editor, edit the fastcgi configuration.

vi /etc/lighttpd/conf.d/fastcgi.conf

At the top of the configuration, add the following lines of code.

fastcgi.server += ( “.php” =>

((

“host” => “127.0.0.1″,

“port” => “9000″,

“broken-scriptfilename” => “enable”

))

)

Restart PHP-FPM and Lighttpd for our changes to take effect.

service php-fpm restart

service lighttpd restart

This entry was posted on Monday, June 11th, 2018 at 5:05 pm and is filed under Mẹo vặt của hiếu râu. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed at this time.