2010-05-12 23:43:42 +08:00
|
|
|
README.SLACKWARE For lighttpd (20090217)
|
|
|
|
|
|
|
|
lighttpd can be started and stopped through the initialization script that
|
|
|
|
is provided:
|
|
|
|
/etc/rc.d/rc.lighttpd start
|
|
|
|
/etc/rc.d/rc.lighttpd stop
|
|
|
|
|
|
|
|
If you would like to start lighttpd automatically when the system
|
|
|
|
is booted, add the following lines to /etc/rc.d/rc.local:
|
|
|
|
if [ -x /etc/rc.d/rc.lighttpd ]; then
|
|
|
|
/etc/rc.d/rc.lighttpd start
|
|
|
|
fi
|
|
|
|
|
|
|
|
Conversely, add the following lines to /etc/rc.d/rc.local_shutdown
|
|
|
|
to stop lighttpd on system shutdown.
|
|
|
|
if [ -x /etc/rc.d/rc.lighttpd ]; then
|
|
|
|
/etc/rc.d/rc.lighttpd stop
|
|
|
|
fi
|
|
|
|
|
|
|
|
* PHP users:
|
|
|
|
Slackware's default php package is meant to work with
|
2018-03-20 15:45:00 +08:00
|
|
|
httpd (apache). It works fine with lighttpd with a couple of tweaks.
|
2010-05-12 23:43:42 +08:00
|
|
|
|
2018-03-20 15:45:00 +08:00
|
|
|
1) You can use its default configuration file /etc/php.ini
|
2010-05-12 23:43:42 +08:00
|
|
|
|
2018-03-20 15:45:00 +08:00
|
|
|
2) Uncomment mod_fastcgi from /etc/lighttpd/modules.conf.
|
2010-05-12 23:43:42 +08:00
|
|
|
|
2018-03-20 15:45:00 +08:00
|
|
|
3) Rework the fastcgi section of /etc/lighttpd/conf.d/fastcgi.conf to
|
|
|
|
the following (or just copy this in below the existing commented
|
|
|
|
out fastcgi config):
|
2010-05-12 23:43:42 +08:00
|
|
|
|
|
|
|
fastcgi.server = ( ".php" =>
|
|
|
|
( "localhost" =>
|
|
|
|
(
|
|
|
|
"socket" => "/var/run/lighttpd/php-fastcgi.socket",
|
2018-03-27 00:06:26 +08:00
|
|
|
"bin-path" => "/usr/bin/php-cgi -c /etc/php.ini"
|
2010-05-12 23:43:42 +08:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
2017-05-14 16:49:55 +08:00
|
|
|
4) Add the lighttpd user to the apache group with a command like
|
|
|
|
|
|
|
|
gpasswd -a lighttpd apache
|
|
|
|
|
|
|
|
Otherwise php won't be able to use $_SESSION, as sessions are stored
|
|
|
|
in /var/lib/php, owned by root:apache with perms 0770.
|
2010-05-12 23:43:42 +08:00
|
|
|
|