在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会提示“对不起,无法连接数据库,请先检查数据库配置再继续进行安装”

阅读剩余部分

相关阅读 >>

linux wordpress gzip压缩开启方法

wordpress中用于创建以及获取侧边栏的php函数讲解

自己做wordpress评论插件修改评论样式(两步美化评论内容)

探讨一下国外主流建站工具的优缺点

在centos 6 中安装wordpress(一) 安装apache,mysql, php环境

基于docker 搭建wordpress的方法

优化wordpress的google字体以加速国内服务器上的运行

开发者应该留意的wordpress2.9新功能小结

分享十五个最佳jquery 幻灯插件和教程

nginx+rsync+inotify实现负载均衡配置方法

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



打赏

取消

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

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

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

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

评论

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