Nginx的Z-Blog的伪静态配置方法

所属分类: CMS教程 / z-blog 阅读数: 2106
收藏 0 赞 0 分享
本站是在LNMP环境下运行,参考Nginx的Z-Blog的静态配置



复制代码
代码如下:

server {
listen 80;
server_name jb51.net blog.jb51.net www.jb51.net;
root /www/web/www_jb51_net/public_html;
index index.html index.php index.htm;
error_page 400 /errpage/400.html;
error_page 403 /errpage/403.html;
error_page 404 /errpage/404.html;
location ~ \.php$ {
proxy_pass http://127.0.0.1:88;
include naproxy.conf;
#include ./rewrite/z-blog_nginx.conf;
rewrite ^/post/([0-9]+).html$ /index.php?id=$1 last;
rewrite ^/([0-9]+).html$ /index.php?id=$1 last;
rewrite ^/(?:page_)?([0-9]*).html$ /index.php?page=$1 last;
rewrite ^/category-([0-9]+)(?:_)?([0-9]*).html$ /index.php?cate=$1&page=$2 last;
rewrite ^/date-([0-9-]+)(?:_)?([0-9]*).html$ /index.php?date=$1&page=$2 last;
rewrite ^/author-([0-9]+)(?:_)?([0-9]*).html$ /index.php?auth=$1&page=$2 last;
rewrite ^/tags-([0-9]+)(?:_)?([0-9]*).html$ /index.php?tags=$1&page=$2 last;
}
location / {
try_files $uri @apache;
}
location @apache {
proxy_pass http://127.0.0.1:88;
include naproxy.conf;
}
}

更多精彩内容其他人还在看

Z-blog自定义标签使用教程

关键字描述:教程 使用 标签 定义 < " > pclass 日期 CSS <!--自定义的标签--> <!--AD <divclass="function"id="divZAD">
收藏 0 赞 0 分享

z-blog简洁翻页条的CSS定义

关键字描述:定义 简洁 < 模板 文件 &rdquo &ldquo 如何 对应 留言 其中“更早的文章”和“之后的文章”分别由span标签的pagebar-previous和pagebar-next类定义,你可以用CSS
收藏 0 赞 0 分享

z-blog的目录、留言、引用标签教程

关键字描述:标签 教程 引用 留言 目录 < " /h3> ul> /ul> <!--网站目录 <divclass="function"id="divCatalog"> <h3
收藏 0 赞 0 分享

Z-Blog常用标签说明

关键字描述:说明 标签 常用 < " > id /h3> /ul> h3> <!--文章归档 <divclass="function"id="divArchives"> <h3
收藏 0 赞 0 分享

Z-Blog文章列表区标签与特殊标签说明

关键字描述:标签 说明 特殊 文章 < default.html catalog.html 文章列表区 多页排列的分页条: <#template:pagebar#>:由default.html和catalog.html引用 <#pageb
收藏 0 赞 0 分享

Z-Blog日历标签与控制面板标签说明

关键字描述:标签 说明 面板 控制 日历 < " > /div> /h3> <!--日历标签 <divclass="function"id="divCalendar"> <h3
收藏 0 赞 0 分享

Z-Blog发表文章区标签教程

关键字描述:教程 标签 文章 发表 :< < 编号 数据 链接 名称 网址 Z-Blog发表文章区标签教程 文章基本数据: 编号:<#article/id#> 链接:<#article/url#> 权限:<#articl
收藏 0 赞 0 分享

zblog模板文件说明

关键字描述:说明 文件 模板 显示 日志 文章 引用 评论 页面 首页 Z-Blog模板类文件说明/TEMPLATE 1.default.html 首页显示模板,引用b_article-istop.html显示置顶文章,引用b_article-multi.html
收藏 0 赞 0 分享

z-blog评论加入Gravatar头像功能

关键字描述:功能 加入 评论 " Gravatar &ldquo #article/comment/emailm Gravatar提供的服务概念上十分简单,就是把个人email地址与头像捆绑(登录 www.gravatar.com申请帐户,上传照片即可完成)
收藏 0 赞 0 分享

Z-blog系统常量标签说明

关键字描述:说明 标签 系统 :< 博客 c_option.asp 标题 页面 认为 Z-Blog系统常量区标签类说明: 1.系统常量区(c_custom.asp,c_option.asp) 当前版本号:<#ZC_BLOG_VERSION#>
收藏 0 赞 0 分享
查看更多