Typecho在ubuntu20.04下的安装要点

安装php7.4及sqplite

apt install php-fpm
apt install php-curl php-mbstring php-sqlite3

php-sqlite3如果未安装,安装时无法显示数据库选项

修改nginx配置

与WordPress不同,typecho需要手工修改配置文件进行rewrite,否则会提示404、405错误

 location / {
                 # First attempt to serve request as file, then
                 # as directory, then fall back to displaying a 404.
                 if (-f $request_filename/index.html){
                    rewrite (.*) $1/index.html break;
                 }
                 if (-f $request_filename/index.php){
                     rewrite (.*) $1/index.php;
                 }
                 if (!-f $request_filename){
                     rewrite (.*) /index.php;
                 }
                 try_files $uri $uri/ /index.php =404 ;
                 # Uncomment to enable naxsi on this location
                 # include /etc/nginx/naxsi.rules
         }
添加新评论