32MB.CN

Install Lighttpd+SQLite+PHP5 on Debian through apt-get
If you want to complie lighttpd on vps,please refer to li...
扫描右侧二维码阅读全文
05
2016/03

Install Lighttpd+SQLite+PHP5 on Debian through apt-get

If you want to complie lighttpd on vps,please refer to lighttpd official documents.
1.Update System.

apt-get update&&apt-get upgrade -y

2.Install Sqlite

apt-get install sqlite

3.Install Lighttpd

apt-get install lighttpd

4.Install php5

apt-get install php5-cgi php5-curl php5-gd

5.edit php.ini to support path info that typecho needs.

vi /etc/php5/cgi/php.ini 

find cgi.fix_pathinfo, change its value to 1 and remove '#' before cgi.fix_pathinfo

cgi.fix_pathinfo = 1

6.swith root dir of root to /home/wwwroot

vi /etc/passwd

then move files from /var/www to /home/wwwroot

mv /var/www /home/wwwroot
chown -R www-data.www-data /home/wwwroot

7.configure lighttpd

cd /etc/lighttpd
vi lighttpd.conf

modify server.document-root

server.document-root="/home/wwwroot"

if your vps only have a nat ipv4 address
change server.port to your nat port

server.port=2017

8.enable fastcgi config

cd conf-enabled
cp ../conf-available/*fastcgi* .

9.optimize fcgi process

vi 15-fastcgi-php.conf

find "PHP_FCGI_CHILDREN" => "4"
change 4 to 1

ok,then you can build website on your vps.

Last modification:February 14th, 2019 at 07:06 pm
If you think my article is useful to you, please feel free to appreciate

Leave a Comment