Ubuntu+lighttpd+sqlite+php安装部署

1.安装 sudo apt-get install php7.0 sudo apt-get install p…

1.安装

sudo apt-get install php7.0

sudo apt-get install php7.0-cgi

sudo apt-get install php7.0-sqlite

sudo apt-get install lighttpd

sudo apt-get install sqlite3

sudo lighttpd-enable-mod cgi fastcgi fastcgi-php

sudo /etc/init.d/lighttpd force-reload

sudo service lighttpd restart

2.配置

sudo vim /etc/lighttpd/lighttpd.conf

server.modules += (

"mod_rewrite",

url.rewrite-once = (

"^/static/(.*)" => "$0",

"^/([^.]+)$" => "/index.php"

扩展:

1.设置多站点

sudo vim /etc/lighttpd/lighttpd.conf

$SERVER["socket"] == "0.0.0.0:88" {

server.document-root = "/var/www/phpinfo"

2.解决Error: unable to open database file,数据库没有可写入的权限

sqlite数据库文件所在的文件夹权限也要改成777

本文来自网络,不代表软粉网立场,转载请注明出处:https://www.rfff.net/p/2726.html

作者: HUI

发表评论

您的电子邮箱地址不会被公开。

返回顶部