在Nginx服务器上安装配置博客程序Typecho的教程


本文整理自网络,侵删。

typecho比wordpress更轻,更专注于写的享受。

现在大多的虚拟机运行环境都是lnmp,安装教程安装typecho可能会遇到404,数据配置错误问题。

把这两天安装typecho的步骤写下来给大家参考.

typecho安装方法

1.下载

#网站目录
cd /usr/local/nginx/html/
wget https://github.com/typecho/typecho/releases/download/v0.9-13.12.12-release/0.9.13.12.12.-release.tar.gz -O typecho.tar.gz
tart -zxvf typecho.tar.gz

这样typecho的源代码放到了/usr/local/nginx/html/build

2.配置nginx的虚拟机(修改www.cxy.cc为你的域名),nginx配置typecho伪静态

 upstream php { server 127.0.0.1:9000; } server { server_name www.cxy.cc; root html/build; access_log logs/wcxy.access.log main; error_log logs/wcxy.error.log; index index.php list.php; location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } if ( !-e $request_filename ) { rewrite ^(.*)$ /index.php$1 last; } location ~ .*.php(/.*)*$ { fastcgi_index index.php; include fastcgi.conf; fastcgi_split_path_info ^((?U).+.php)(/?.+)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; fastcgi_intercept_errors on; fastcgi_pass php; } location /status { #stub_status on; access_log off; } location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$ { expires 30d; } location ~ .*.(js|css)?$ { expires 12h; } } 

3.登陆phpmyadmin,新建数据库,一定要提前建立数据库,如果直接安装typecho会提示“对不起,无法连接数据库,请先检查数据库配置再继续进行安装”

阅读剩余部分

相关阅读 >>

wordpress中is_sticky()判断文章是否置顶的参数与用法

wordpress过滤垃圾评论的几种主要方法小结

详解wordpress中的头像缓存和代理中的缓存更新方法

详解wordpress开发中get_current_screen()函数的使用

教你实现wordpress博客的“预加载”功能

wordpress别名已被其它条目使用的解决方法

wordpress之header设计

wordpress免插件实现面包屑导航的示例代码

编写php脚本清除wordpress头部冗余代码的方法讲解

使用cdn和ajax加速wordpress中jquery的加载

更多相关阅读请进入《wordpress》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...